Skip to content

Commit bea2c4b

Browse files
committed
Restructured docker installs and added some cleanup
1 parent 51a3d0f commit bea2c4b

File tree

1 file changed

+26
-19
lines changed

1 file changed

+26
-19
lines changed

Dockerfile

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ EXPOSE 22 7200 7777 8080 9090 3000
44

55
# Env config
66
ENV TERM=xterm-256color
7-
ENV DEBIAN_FRONTEND=noninteractive
7+
8+
# Build args
9+
ARG DEBIAN_FRONTEND=noninteractive
810

911
RUN chown root:root /tmp && chmod ugo+rwXt /tmp
1012

@@ -29,22 +31,28 @@ RUN rm /etc/dpkg/dpkg.cfg.d/excludes && \
2931
#=============================================
3032
# Misc libs and tools
3133
#=============================================
32-
RUN apt-get install -y libgtk2.0-0 libcanberra-gtk-module libxext-dev libxrender-dev libxtst-dev xclip man nano vim software-properties-common tmux htop dos2unix mc gnome-keyring figlet jq strace atop rpm python3-pip python-pip graphviz inotify-tools pv xmlstarlet xmldiff q-text-as-data m4 tree silversearcher-ag libxml2-utils libwebsockets-dev
34+
RUN apt-get install -y libgtk2.0-0 libcanberra-gtk-module libxext-dev libxrender-dev libxtst-dev xclip man nano vim software-properties-common \
35+
tmux htop dos2unix mc gnome-keyring figlet jq strace atop rpm python3-pip python-pip graphviz inotify-tools pv xmlstarlet xmldiff \
36+
q-text-as-data m4 tree silversearcher-ag libxml2-utils libwebsockets-dev konsole most tig && \
37+
apt-get clean
3338

3439
#=============================================
3540
# Networking tools
3641
#=============================================
37-
RUN apt-get install -qqy curl telnet tcpdump nmap iputils-ping traceroute whois net-tools dnsutils netcat lsof ngrep sshfs cifs-utils
42+
RUN apt-get install -qqy curl telnet tcpdump nmap iputils-ping traceroute whois net-tools dnsutils netcat lsof ngrep sshfs cifs-utils && \
43+
apt-get clean
3844

3945
#=============================================
4046
# GIT
4147
#=============================================
42-
RUN apt-get -y install git bash-completion git-flow gitk tig
48+
RUN apt-get -y install git bash-completion git-flow gitk tig && \
49+
apt-get clean
4350

4451
#=============================================
4552
# Install java12
4653
#=============================================
47-
RUN apt-get install -y openjdk-12-jdk
54+
RUN apt-get install -y openjdk-12-jdk && \
55+
apt-get clean
4856

4957
#=============================================
5058
# Install go
@@ -59,7 +67,8 @@ RUN add-apt-repository ppa:longsleep/golang-backports && \
5967
#=============================================
6068
# Install nodejs
6169
#=============================================
62-
RUN apt-get install -y nodejs npm
70+
RUN apt-get install -y nodejs npm && \
71+
apt-get clean
6372

6473
#=============================================
6574
# Add sudo
@@ -73,10 +82,6 @@ RUN apt-get install -y cifs-utils sudo && \
7382
RUN apt-get install -y openssh-server && \
7483
sed -i -e s/prohibit-password/yes/ /etc/ssh/sshd_config
7584

76-
#=============================================
77-
# Terminal emulators
78-
#=============================================
79-
RUN apt-get install -y konsole
8085

8186
#=============================================
8287
# Firefox
@@ -92,7 +97,8 @@ RUN apt-get -y install bzip2 dbus-x11 && \
9297
tar -C /opt -xjf /tmp/firefox.tar.bz2 && \
9398
rm /tmp/firefox.tar.bz2 && \
9499
mv /opt/firefox /opt/firefox-$FIREFOX_VERSION && \
95-
ln -fs /opt/firefox-$FIREFOX_VERSION/firefox /usr/bin/firefox
100+
ln -fs /opt/firefox-$FIREFOX_VERSION/firefox /usr/bin/firefox && \
101+
apt-get clean
96102

97103
#=============================================
98104
# Docker-ce, allow running docker in docker
@@ -102,7 +108,8 @@ RUN apt install -y apt-transport-https ca-certificates curl gnupg-agent software
102108
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \
103109
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu disco stable" && \
104110
apt-get update && \
105-
apt-get install -y docker-ce
111+
apt-get install -y docker-ce && \
112+
apt-get clean
106113

107114
#=============================================
108115
# Timezone and locale
@@ -115,11 +122,12 @@ RUN apt-get install -y locales tzdata && \
115122

116123
RUN wget -nv https://packagecloud.io/AtomEditor/atom/gpgkey -O /tmp/AtomEditor_atom.pub.gpg \
117124
&& wget -nv https://dl-ssl.google.com/linux/linux_signing_key.pub -O /tmp/google.pub.gpg \
118-
&& wget -nv https://download.docker.com/linux/ubuntu/gpg -O /tmp/docker.pub.gpg
119-
120-
RUN apt-key add /tmp/google.pub.gpg \
125+
&& wget -nv https://download.docker.com/linux/ubuntu/gpg -O /tmp/docker.pub.gpg \
126+
&& apt-key add /tmp/google.pub.gpg \
121127
&& apt-key add /tmp/docker.pub.gpg \
122-
&& apt-get clean && apt-get update \
128+
&& apt-get clean \
129+
&& apt-get update \
130+
&& apt-get clean \
123131
&& rm /tmp/*.pub.gpg
124132

125133
#=============================================
@@ -154,16 +162,15 @@ RUN apt-get install -y cmake g++ pkg-config vim-common libwebsockets-dev libjson
154162
&& cd ttyd && mkdir build && cd build \
155163
&& cmake .. \
156164
&& make && make install
165+
&& rm -rf /tmp/ttyd
157166

158167
#=============================================
159168
# Misc tools
160169
#=============================================
161170
# ripgrep
162171
RUN curl -LO https://github.com/BurntSushi/ripgrep/releases/download/11.0.2/ripgrep_11.0.2_amd64.deb && sudo dpkg -i ripgrep_11.0.2_amd64.deb
163172
# fzf
164-
RUN cd /tmp && git clone --depth 1 https://github.com/junegunn/fzf.git && /tmp/fzf/install --bin && cp /tmp/fzf/bin/fzf /usr/bin/fzf
165-
# most & tig
166-
RUN apt-get install -y most tig
173+
RUN cd /tmp && git clone --depth 1 https://github.com/junegunn/fzf.git && /tmp/fzf/install --bin && cp /tmp/fzf/bin/fzf /usr/bin/fzf && rm -rf /tmp/fzf
167174

168175
#=============================================
169176
# Set root pwd

0 commit comments

Comments
 (0)