|
1 | 1 | # Container for Cisco Packet Tracer 8.2.1 with Podman
|
2 | 2 |
|
3 |
| -This is my personal repos to build Packet Tracer container on Fedora (running Xorg not Wayland). |
| 3 | +This is my personal repos to build Packet Tracer container on Fedora (running **Xorg** not Wayland). |
4 | 4 |
|
5 | 5 | - Packet Tracer is only supported on Ubuntu so I'm building a Ubuntu container with Podman.
|
6 | 6 | - Packet Tracer has a mandatory login process (skillsforall.com) so I added firefox.
|
7 | 7 | - Also added a missing qt5 lib for version **8.2.1**.
|
8 | 8 |
|
9 | 9 | Install the application with [Podman](https://docs.fedoraproject.org/en-US/neurofedora/containers/):
|
10 | 10 |
|
11 |
| -# Download Ubuntu package from [skillsforall.com](https://skillsforall.com/resources/lab-downloads): |
| 11 | +Note you need to **accept EULA (End-User-License-Agreement)** from Cisco to install the software on your system. A **dialog will show up** during the installation. |
12 | 12 |
|
13 |
| -``` |
14 |
| -# Will install current Packet_Tracer821_amd64_signed.deb from the container and accept EULA (End-User-License-Agreement) (needs working tty) |
15 |
| -cp ./Packet_Tracer821_amd64_signed.deb /tmp/share/ |
16 |
| -``` |
| 13 | +# build.sh script: |
| 14 | + |
| 15 | +The script will run a container then create a local image with Packet Tracer installed. |
17 | 16 |
|
18 |
| -# Build the image and start new container |
| 17 | +You can then use that image to run a container with the application already installed: tags are editable on top of the script (variables). |
19 | 18 |
|
20 |
| -Adding a shared volume to the container to install the app and also share files between the host and the container. |
| 19 | +# Download Ubuntu package from Cisco |
21 | 20 |
|
22 |
| -Note: the container needs access to X11 socket for GUI apps to run. Sharing Display env + X11 socket and granting access to it with SELinux label. |
| 21 | +Signup or login to [skillsforall.com](https://skillsforall.com/resources/lab-downloads) to download the Ubuntu version. |
| 22 | + |
| 23 | +You should get a .deb file (e.g Packet_Tracer821_amd64_signed.deb). |
| 24 | + |
| 25 | +# build the image |
23 | 26 |
|
24 | 27 | ```
|
25 |
| -podman build -t img_packettracer -f dockerfile . |
26 |
| -podman run --name c_packettracer -dt -e DISPLAY -v /tmp/share:/SHARE:Z -v /tmp/.X11-unix:/tmp/.X11-unix --security-opt label=type:container_runtime_t img_packettracer |
| 28 | +mkdir tmp && cd tmp |
| 29 | +git clone https://github.com/lpwprojects/packettracer_container.git . |
| 30 | +cp ~/Downloads/Packet_Tracer821_amd64_signed.deb . |
| 31 | +chmod +x ./build.sh |
| 32 | +./build.sh |
27 | 33 | ```
|
28 | 34 |
|
29 |
| -# Install the app |
| 35 | +# Create new container from local image with the application |
30 | 36 |
|
31 | 37 | ```
|
32 |
| -podman exec -t -i c_packettracer /bin/bash |
33 |
| -cp /SHARE/Packet_Tracer821_amd64_signed.deb . |
34 |
| -apt install ./Packet_Tracer821_amd64_signed.deb |
35 |
| -[...] |
36 |
| -exit |
| 38 | +# Example with shared volume '/home/share' from host as '/SHARE' inside container (e.g import labs you download into Packet Tracer) |
| 39 | +podman run --name <CONTAINER NAME> -dt -e DISPLAY -v /home/share:/SHARE:Z -v /tmp/.X11-unix:/tmp/.X11-unix --security-opt label=type:container_runtime_t <LOCAL IMAGE NAME> |
37 | 40 | ```
|
38 |
| -# Run the app |
| 41 | + |
| 42 | +# Run the application |
39 | 43 |
|
40 | 44 | ```
|
41 |
| -# bashr: alias packettracer='podman start c_packettracer && podman exec c_packettracer packettracer ; podman stop c_packettracer' |
| 45 | +podman exec <CONTAINER NAME> packettracer |
42 | 46 |
|
43 |
| -podman start c_packettracer |
44 |
| -podman exec c_packettracer packettracer |
45 |
| -# podman stop c_packettracer |
| 47 | +# ==> bashr: alias packettracer='podman start <CONTAINER NAME> && podman exec <CONTAINER NAME> packettracer ; podman stop <CONTAINER NAME>' |
46 | 48 | ```
|
47 | 49 |
|
0 commit comments