Update Dockerfile
Browse files- Dockerfile +8 -7
Dockerfile
CHANGED
|
@@ -6,20 +6,21 @@ RUN apt-get update && apt-get install -y \
|
|
| 6 |
curl \
|
| 7 |
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
-
#
|
|
|
|
|
|
|
|
|
|
| 10 |
COPY ssh-config/sshd_config /etc/ssh/sshd_config
|
| 11 |
-
|
| 12 |
-
RUN chmod 600 /etc/ssh/sshd_config && chmod 644 /etc/danted.conf
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
|
| 16 |
|
| 17 |
-
#
|
| 18 |
WORKDIR /app
|
| 19 |
COPY . /app
|
| 20 |
RUN chmod +x /app/entrypoint.sh
|
| 21 |
|
| 22 |
EXPOSE 22 1080
|
| 23 |
-
USER root
|
| 24 |
|
| 25 |
ENTRYPOINT ["/app/entrypoint.sh"]
|
|
|
|
| 6 |
curl \
|
| 7 |
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
+
# Create required dirs
|
| 10 |
+
RUN mkdir -p /var/run/sshd
|
| 11 |
+
|
| 12 |
+
# Copy configs with root access
|
| 13 |
COPY ssh-config/sshd_config /etc/ssh/sshd_config
|
| 14 |
+
RUN chmod 600 /etc/ssh/sshd_config
|
|
|
|
| 15 |
|
| 16 |
+
# Set user to root (important!)
|
| 17 |
+
USER root
|
| 18 |
|
| 19 |
+
# Copy rest of the app
|
| 20 |
WORKDIR /app
|
| 21 |
COPY . /app
|
| 22 |
RUN chmod +x /app/entrypoint.sh
|
| 23 |
|
| 24 |
EXPOSE 22 1080
|
|
|
|
| 25 |
|
| 26 |
ENTRYPOINT ["/app/entrypoint.sh"]
|