Update Dockerfile
Browse files- Dockerfile +11 -7
Dockerfile
CHANGED
@@ -5,7 +5,9 @@ FROM ubuntu:latest
|
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
bash \
|
7 |
wget \
|
8 |
-
ca-certificates
|
|
|
|
|
9 |
|
10 |
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
11 |
|
@@ -14,12 +16,14 @@ RUN mkdir -p /data && chown -R 1001:1001 /data
|
|
14 |
|
15 |
# Download and install gotty
|
16 |
RUN wget -O gotty.tar.gz https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_amd64.tar.gz \
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
# Create user 1001
|
22 |
-
RUN useradd -u 1001 -d /data user1001
|
|
|
|
|
23 |
|
24 |
# Switch to user 1001 and set working directory
|
25 |
USER 1001
|
|
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
bash \
|
7 |
wget \
|
8 |
+
ca-certificates \
|
9 |
+
sudo \
|
10 |
+
openvpn
|
11 |
|
12 |
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
13 |
|
|
|
16 |
|
17 |
# Download and install gotty
|
18 |
RUN wget -O gotty.tar.gz https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_amd64.tar.gz \
|
19 |
+
&& tar -xzvf gotty.tar.gz -C /usr/local/bin/ \
|
20 |
+
&& chmod +x /usr/local/bin/gotty \
|
21 |
+
&& rm gotty.tar.gz
|
22 |
+
|
23 |
+
# Create user 1001 and set working directory
|
24 |
+
RUN useradd -u 1001 -d /data user1001 \
|
25 |
+
&& echo 'user1001 ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user1001 \
|
26 |
+
&& chmod 0440 /etc/sudoers.d/user1001
|
27 |
|
28 |
# Switch to user 1001 and set working directory
|
29 |
USER 1001
|