8000 Update Dockerfile · coder/deploy-code-server@3e1b00b · GitHub
[go: up one dir, main page]

Skip to content

Commit 3e1b00b

Browse files
authored
Update Dockerfile
1 parent 25614b9 commit 3e1b00b

File tree

1 file changed

+6
-49
lines changed

1 file changed

+6
-49
lines changed

Dockerfile

Lines changed: 6 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,21 @@
11
# Start from the code-server Debian base image
22
FROM codercom/code-server:4.9.0
33

4-
USER coder
5-
6-
# Apply VS Code settings
7-
COPY deploy-container/settings.json .local/share/code-server/User/settings.json
8-
94
# Use bash shell
105
ENV SHELL=/bin/bash
116

12-
# Install unzip + rclone (support for remote filesystem)
13-
RUN sudo apt-get update && sudo apt-get install unzip -y
14-
RUN curl https://rclone.org/install.sh | sudo bash
15-
16-
# Copy rclone tasks to /tmp, to potentially be used
17-
COPY deploy-container/rclone-tasks.json /tmp/rclone-tasks.json
18-
19-
# Fix permissions for code-server
20-
RUN sudo chown -R coder:coder /home/coder/.local
21-
22-
# You can add custom software and dependencies for your environment a# Start from the code-server Debian base image
23-
FROM codercom/code-server:4.9.0
24-
25-
USER coder
26-
27-
# Apply VS Code settings
28-
COPY deploy-container/settings.json .local/share/code-server/User/settings.json
29-
30-
# Use bash shell
31-
ENV SHELL=/bin/bash
7+
# Switch to root user
8+
USER root
329

3310
# Install unzip + rclone (support for remote filesystem)
34-
RUN sudo apt-get update && sudo apt-get install unzip -y
35-
RUN curl https://rclone.org/install.sh | sudo bash
11+
RUN apt-get update && apt-get install unzip -y
12+
RUN curl https://rclone.org/install.sh | bash
3613

3714
# Copy rclone tasks to /tmp, to potentially be used
3815
COPY deploy-container/rclone-tasks.json /tmp/rclone-tasks.json
3916

4017
# Fix permissions for code-server
41-
RUN sudo chown -R coder:coder /home/coder/.local
18+
RUN chown -R coder:coder /home/coder/.local
4219

4320
# You can add custom software and dependencies for your environment below
4421
# -----------
@@ -48,7 +25,7 @@ RUN sudo chown -R coder:coder /home/coder/.local
4825
# RUN code-server --install-extension esbenp.prettier-vscode
4926

5027
# Install apt packages:
51-
# RUN sudo apt-get install -y ubuntu-make
28+
# RUN apt-get install -y ubuntu-make
5229

5330
# Copy files:
5431
# COPY deploy-container/myTool /home/coder/myTool
@@ -61,26 +38,6 @@ ENV PORT=8080
6138
# Set the password
6239
ENV PASSWORD=password
6340

64-
# Use our custom entrypoint script first
65-
COPY deploy-container/entrypoint.sh /usr/bin/deploy-container-entrypoint.sh
66-
ENTRYPOINT ["/usr/bin/deploy-container-entrypoint.sh"]below
67-
# -----------
68-
69-
# Install a VS Code extension:
70-
# 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
71-
# RUN code-server --install-extension esbenp.prettier-vscode
72-
73-
# Install apt packages:
74-
# RUN sudo apt-get install -y ubuntu-make
75-
76-
# Copy files:
77-
# COPY deploy-container/myTool /home/coder/myTool
78-
79-
# -----------
80-
81-
# Port
82-
ENV PORT=8080
83-
8441
# Use our custom entrypoint script first
8542
COPY deploy-container/entrypoint.sh /usr/bin/deploy-container-entrypoint.sh
8643
ENTRYPOINT ["/usr/bin/deploy-container-entrypoint.sh"]

0 commit comments

Comments
 (0)
0