code / Dockerfile
dracoox's picture
Update Dockerfile
ac78310 verified
raw
history blame
863 Bytes
FROM debian:sid
# Update and install dependencies including doas
RUN apt update && apt install -y wget curl git doas && \
chmod u+s /usr/bin/doas && \
echo "permit persist user as root" > /etc/doas.conf && \
chown root:root /etc/doas.conf && chmod 0400 /etc/doas.conf
# Create user 'user' with UID 1000 and bash shell
RUN useradd -m -u 1000 -s /bin/bash user
# Install Neofetch
RUN git clone https://github.com/dylanaraps/neofetch.git /opt/neofetch && \
ln -s /opt/neofetch/neofetch /usr/local/bin/neofetch
# Install code-server
RUN curl -fsSL https://code-server.dev/install.sh | sh
# Switch to user
USER user
# Set environment variables
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Start code-server without authentication on all interfaces at port 7860
CMD ["code-server", "--auth", "none", "--bind-addr", "0.0.0.0:7860"]