-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerfile-cisco-packet-tracer-single
91 lines (72 loc) · 2.82 KB
/
dockerfile-cisco-packet-tracer-single
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
ARG BASE_TAG="1.12.0"
ARG BASE_IMAGE="core-ubuntu-jammy"
FROM kasmweb/$BASE_IMAGE:$BASE_TAG
USER root
ENV HOME /home/kasm-default-profile
ENV STARTUPDIR /dockerstartup
ENV INST_SCRIPTS $STARTUPDIR/install
WORKDIR $HOME
######### Customize Container Here ###########
### Install sudo
RUN apt-get update && \
apt-get install -y sudo && \
echo 'kasm-user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && \
rm -rf /var/lib/apt/list/*
### Install and update packages
RUN apt-get update && \
apt-get install -y apt-utils
RUN apt-get update && \
apt-get remove -y squid-openssl && \
apt-get dist-upgrade -y
RUN apt-get update && \
apt-get install -y \
wget \
curl \
ca-certificates \
python3 \
python3-pip \
python3-gpg \
libqt5quick5 \
libqt5multimedia5 \
libqt5webengine5 \
libqt5webenginewidgets5 \
libqt5webenginecore5 \
libqt5networkauth5 \
libqt5svg5 \
libqt5websockets5 \
libqt5xml5 \
libqt5script5 \
libqt5scripttools5 \
libqt5sql5 \
libqt5texttospeech5
# Fix missing libssl1 package in 22.04
# check version in http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/?C=M;O=D
RUN wget -O /tmp/libssl.deb http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb
RUN apt-get install -y /tmp/libssl.deb
RUN rm -f /tmp/libssl.dev
RUN apt-get autoremove -y && apt-get autoclean -y
WORKDIR $HOME/Downloads
# Installing Packet Tracer
COPY ./bin/Packet_Tracer821_amd64_signed.deb .
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
echo 'PacketTracer PacketTracer_821_amd64/show-eula string ' | debconf-set-selections && \
echo 'PacketTracer PacketTracer_821_amd64/accept-eula boolean true' | debconf-set-selections && \
apt-get install -y ./Packet_Tracer821_amd64_signed.deb
RUN rm -f ./Downloads/Packet_Tracer821_amd64_signed.deb
RUN sed -i -e 's/PacketTracer/PacketTracer --no-sandbox/g' /opt/pt/packettracer
COPY ./src/ubuntu/install/cisco-packet-tracer/custom_startup.sh $STARTUPDIR/custom_startup.sh
RUN chmod +x $STARTUPDIR/custom_startup.sh
RUN chmod 755 $STARTUPDIR/custom_startup.sh
# Update the desktop environment to be optimized for a single application
RUN cp $HOME/.config/xfce4/xfconf/single-application-xfce-perchannel-xml/* $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/
RUN cp /usr/share/extra/backgrounds/bg_kasm.png /usr/share/extra/backgrounds/bg_default.png
RUN apt-get remove -y xfce4-panel
RUN apt-get autoremove -y && apt-get autoclean -y
######### End Customizations ###########
RUN chown 1000:0 $HOME
RUN $STARTUPDIR/set_user_permission.sh $HOME
ENV HOME /home/kasm-user
WORKDIR $HOME
RUN mkdir -p $HOME && chown -R 1000:0 $HOME
RUN mkdir $HOME/pt && chown 1000:1000 $HOME/pt
USER 1000