Aproved / Dockerfile
Ramczy's picture
Update Dockerfile
7a0ea9b verified
raw
history blame contribute delete
938 Bytes
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Install necessary packages
RUN apt-get update && apt-get install -y curl python3.11 python3-pip libmagic1 \
speedtest-cli neofetch ffmpeg imagemagick git git-lfs zip wget unzip yarn \
whois software-properties-common npm
# Install Node.js and global npm packages
RUN npm install n -g && n 20
RUN npm install npm@latest -g
RUN npm install -g pm2 yarn
# Create a user named 'ramm'
RUN useradd -m -u 1000 ramm
# Install code-server
RUN curl -fsSL https://code-server.dev/install.sh | sh
# Switch to 'ramm' user
USER ramm
ENV HOME=/home/ramm \
PATH=/home/ramm/.local/bin:$PATH
WORKDIR $HOME
# Copy files into the container and set permissions for the 'ramm' user
COPY --chown=ramm . $HOME/server
# Start code-server using PM2 (Ensure correct syntax and options)
CMD ["pm2-runtime", "start", "code-server", "--", ".", "--bind-addr", "0.0.0.0:7860", "--auth", "none"]