-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
72 lines (67 loc) · 2.19 KB
/
Dockerfile
File metadata and controls
72 lines (67 loc) · 2.19 KB
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
FROM gui-apps-base:21.04
MAINTAINER Gabriel Ionescu <gabi.ionescu+dockerthings@protonmail.com>
RUN echo "\n > REMOVE HOST USER\n" \
&& rm -rf /home/$DOCKER_USERNAME \
\
&& grep -v $DOCKER_USERNAME /etc/passwd > /etc/passwd.new \
&& rm -f /etc/passwd \
&& mv /etc/passwd.new /etc/passwd \
\
&& grep -v $DOCKER_USERNAME /etc/group > /etc/group.new \
&& rm -f /etc/group \
&& mv /etc/group.new /etc/group \
\
&& rm -f /etc/sudoers.d/$DOCKER_USERNAME \
\
&& echo "\n > CREATE USER\n" \
&& mkdir -p /home/sublimetext \
&& echo "sublimetext:x:$DOCKER_USERID:$DOCKER_GROUPID:sublimetext,,,:/home/sublimetext:/bin/bash" >> /etc/passwd \
&& echo "sublimetext:x:$DOCKER_USERID:" >> /etc/group \
&& mkdir -p /etc/sudoers.d \
&& echo "sublimetext ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/sublimetext \
&& chmod 0440 /etc/sudoers.d/sublimetext \
&& chown $DOCKER_USERID:$DOCKER_GROUPID -R /home/sublimetext \
&& chmod 777 -R /home/sublimetext \
\
&& echo "\n > INSTALL DEPENDENCIES\n" \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
apt-transport-https \
apt-utils \
gpg-agent \
software-properties-common \
wget \
sudo \
libgl1 \
&& echo "\n > INSTALL DEV UTILITIES\n" \
&& apt-get install -y --no-install-recommends \
git \
subversion \
golang \
# && add-apt-repository -y ppa:ondrej/php \
# && apt-get update \
# && apt-get install -y --no-install-recommends \
# php7.2 \
# php7.2-cli \
\
&& echo "\n > INSTALL SUBLIME TEXT\n" \
&& wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - \
&& echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
sublime-text \
\
&& echo "\n > CLEANUP\n" \
&& apt-get purge -y \
software-properties-common \
gpg-agent \
&& apt-get clean -y \
&& apt-get autoclean -y \
&& apt-get autoremove -y
COPY install/sublimetext /usr/bin/sublimetext
RUN chmod +x /usr/bin/sublimetext
# SET USER
WORKDIR /home/sublimetext
USER sublimetext
# ENTRYPOINT
ENTRYPOINT ["/usr/bin/sublimetext"]