Update Dockerfile
Browse files- Dockerfile +11 -6
Dockerfile
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
FROM debian:sid
|
| 2 |
|
| 3 |
-
# Update
|
| 4 |
-
RUN apt update && apt install -y wget curl
|
| 5 |
|
| 6 |
-
# Create user
|
| 7 |
-
RUN useradd -m -u 1000 user
|
|
|
|
|
|
|
| 8 |
|
| 9 |
# Install Neofetch
|
| 10 |
RUN git clone https://github.com/dylanaraps/neofetch.git /opt/neofetch && \
|
|
@@ -13,9 +15,12 @@ RUN git clone https://github.com/dylanaraps/neofetch.git /opt/neofetch && \
|
|
| 13 |
# Install code-server
|
| 14 |
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
| 15 |
|
| 16 |
-
#
|
|
|
|
|
|
|
|
|
|
| 17 |
ENV HOME=/home/user \
|
| 18 |
PATH=/home/user/.local/bin:$PATH
|
| 19 |
|
| 20 |
# Start code-server
|
| 21 |
-
CMD code-server --auth none --bind-addr 0.0.0.0:7860
|
|
|
|
| 1 |
FROM debian:sid
|
| 2 |
|
| 3 |
+
# Update and install dependencies
|
| 4 |
+
RUN apt update && apt install -y wget curl git doas
|
| 5 |
|
| 6 |
+
# Create user and give them doas (root) privileges
|
| 7 |
+
RUN useradd -m -u 1000 -s /bin/bash user && \
|
| 8 |
+
echo "permit persist user as root" > /etc/doas.conf && \
|
| 9 |
+
chown root:root /etc/doas.conf && chmod 0400 /etc/doas.conf
|
| 10 |
|
| 11 |
# Install Neofetch
|
| 12 |
RUN git clone https://github.com/dylanaraps/neofetch.git /opt/neofetch && \
|
|
|
|
| 15 |
# Install code-server
|
| 16 |
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
| 17 |
|
| 18 |
+
# Switch to the user
|
| 19 |
+
USER user
|
| 20 |
+
|
| 21 |
+
# Set environment for code-server
|
| 22 |
ENV HOME=/home/user \
|
| 23 |
PATH=/home/user/.local/bin:$PATH
|
| 24 |
|
| 25 |
# Start code-server
|
| 26 |
+
CMD ["code-server", "--auth", "none", "--bind-addr", "0.0.0.0:7860"]
|