1
1
# Start from the code-server Debian base image
2
2
FROM codercom/code-server:4.9.0
3
3
4
- USER coder
5
-
6
- # Apply VS Code settings
7
- COPY deploy-container/settings.json .local/share/code-server/User/settings.json
8
-
9
4
# Use bash shell
10
5
ENV SHELL=/bin/bash
11
6
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
32
9
33
10
# 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
36
13
37
14
# Copy rclone tasks to /tmp, to potentially be used
38
15
COPY deploy-container/rclone-tasks.json /tmp/rclone-tasks.json
39
16
40
17
# Fix permissions for code-server
41
- RUN sudo chown -R coder:coder /home/coder/.local
18
+ RUN chown -R coder:coder /home/coder/.local
42
19
43
20
# You can add custom software and dependencies for your environment below
44
21
# -----------
@@ -48,7 +25,7 @@ RUN sudo chown -R coder:coder /home/coder/.local
48
25
# RUN code-server --install-extension esbenp.prettier-vscode
49
26
50
27
# Install apt packages:
51
- # RUN sudo apt-get install -y ubuntu-make
28
+ # RUN apt-get install -y ubuntu-make
52
29
53
30
# Copy files:
54
31
# COPY deploy-container/myTool /home/coder/myTool
@@ -61,26 +38,6 @@ ENV PORT=8080
61
38
# Set the password
62
39
ENV PASSWORD=password
63
40
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
-
84
41
# Use our custom entrypoint script first
85
42
COPY deploy-container/entrypoint.sh /usr/bin/deploy-container-entrypoint.sh
86
43
ENTRYPOINT ["/usr/bin/deploy-container-entrypoint.sh" ]
0 commit comments