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