diff --git a/Dockerfile b/Dockerfile index 7af0f7bf..6827209a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,33 +1,31 @@ # Start from the code-server Debian base image FROM codercom/code-server:4.9.0 -USER coder - -# Apply VS Code settings -COPY deploy-container/settings.json .local/share/code-server/User/settings.json - # Use bash shell ENV SHELL=/bin/bash +# Switch to root user +USER root + # Install unzip + rclone (support for remote filesystem) -RUN sudo apt-get update && sudo apt-get install unzip -y -RUN curl https://rclone.org/install.sh | sudo bash +RUN apt-get update && apt-get install unzip -y +RUN curl https://rclone.org/install.sh | bash # Copy rclone tasks to /tmp, to potentially be used COPY deploy-container/rclone-tasks.json /tmp/rclone-tasks.json # Fix permissions for code-server -RUN sudo chown -R coder:coder /home/coder/.local +RUN chown -R coder:coder /home/coder/.local # You can add custom software and dependencies for your environment below # ----------- # Install a VS Code extension: -# Note: we use a different marketplace than VS Code. See https://github.com/cdr/code-server/blob/main/docs/FAQ.md#differences-compared-to-vs-code +# Note: we use a different marketplace than VS Code. See [Reference Number 2](https://github.com/cdr/code-server/blob/main/docs/FAQ.md#differences-compared-to-vs-code) # RUN code-server --install-extension esbenp.prettier-vscode # Install apt packages: -# RUN sudo apt-get install -y ubuntu-make +# RUN apt-get install -y ubuntu-make # Copy files: # COPY deploy-container/myTool /home/coder/myTool @@ -37,6 +35,9 @@ RUN sudo chown -R coder:coder /home/coder/.local # Port ENV PORT=8080 +# Set the password +ENV PASSWORD=password + # Use our custom entrypoint script first COPY deploy-container/entrypoint.sh /usr/bin/deploy-container-entrypoint.sh ENTRYPOINT ["/usr/bin/deploy-container-entrypoint.sh"]