Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +6 -4
Dockerfile
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
|
| 2 |
# Use Ubuntu as the base image
|
| 3 |
FROM ubuntu:latest
|
| 4 |
|
|
@@ -23,16 +22,19 @@ RUN apt-get update && \
|
|
| 23 |
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
| 24 |
|
| 25 |
# Create a user to run code-server
|
| 26 |
-
RUN useradd -m coder && \
|
| 27 |
echo 'coder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
| 28 |
|
| 29 |
-
#
|
| 30 |
USER coder
|
| 31 |
|
|
|
|
|
|
|
|
|
|
| 32 |
# Expose the default code-server port
|
| 33 |
EXPOSE 8080
|
| 34 |
|
| 35 |
# Start code-server
|
| 36 |
CMD ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "none"]
|
| 37 |
|
| 38 |
-
# End of Dockerfile
|
|
|
|
|
|
|
| 1 |
# Use Ubuntu as the base image
|
| 2 |
FROM ubuntu:latest
|
| 3 |
|
|
|
|
| 22 |
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
| 23 |
|
| 24 |
# Create a user to run code-server
|
| 25 |
+
RUN useradd -m -s /bin/bash coder && \
|
| 26 |
echo 'coder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
| 27 |
|
| 28 |
+
# Switch to the coder user
|
| 29 |
USER coder
|
| 30 |
|
| 31 |
+
# Set the coder user as root
|
| 32 |
+
RUN sudo -i
|
| 33 |
+
|
| 34 |
# Expose the default code-server port
|
| 35 |
EXPOSE 8080
|
| 36 |
|
| 37 |
# Start code-server
|
| 38 |
CMD ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "none"]
|
| 39 |
|
| 40 |
+
# End of Dockerfile
|