Update Dockerfile
Browse files- Dockerfile +17 -32
Dockerfile
CHANGED
@@ -1,11 +1,7 @@
|
|
1 |
-
#
|
2 |
-
|
3 |
-
ARG BASE=debian:12
|
4 |
-
FROM scratch AS packages
|
5 |
-
COPY release-packages/code-server*.deb /tmp/
|
6 |
-
|
7 |
-
FROM $BASE
|
8 |
|
|
|
9 |
RUN apt-get update \
|
10 |
&& apt-get install -y \
|
11 |
curl \
|
@@ -25,34 +21,23 @@ RUN apt-get update \
|
|
25 |
zsh \
|
26 |
&& git lfs install \
|
27 |
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
28 |
|
29 |
-
#
|
30 |
-
|
31 |
-
&& locale-gen
|
32 |
-
ENV LANG=en_US.UTF-8
|
33 |
|
34 |
-
|
35 |
-
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
&& chown root:root /usr/local/bin/fixuid \
|
40 |
-
&& chmod 4755 /usr/local/bin/fixuid \
|
41 |
-
&& mkdir -p /etc/fixuid \
|
42 |
-
&& printf "user: coder\ngroup: coder\n" > /etc/fixuid/config.yml
|
43 |
|
44 |
-
|
45 |
-
RUN
|
46 |
-
|
47 |
-
# Allow users to have scripts run on container startup to prepare workspace.
|
48 |
-
# https://github.com/coder/code-server/issues/5177
|
49 |
-
ENV ENTRYPOINTD=${HOME}/entrypoint.d
|
50 |
|
|
|
51 |
EXPOSE 8080
|
52 |
-
|
53 |
-
#
|
54 |
-
|
55 |
-
USER 1000
|
56 |
-
ENV USER=coder
|
57 |
-
WORKDIR /home/coder
|
58 |
-
ENTRYPOINT ["entrypoint.sh", "--bind-addr", "0.0.0.0:8080", "."]
|
|
|
1 |
+
# Use Ubuntu as base image
|
2 |
+
FROM ubuntu:latest
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
+
# Install git and curl
|
5 |
RUN apt-get update \
|
6 |
&& apt-get install -y \
|
7 |
curl \
|
|
|
21 |
zsh \
|
22 |
&& git lfs install \
|
23 |
&& rm -rf /var/lib/apt/lists/*
|
24 |
+
# Clone the repository
|
25 |
+
RUN git clone https://github.com/coder/code-server.git /code-server
|
26 |
|
27 |
+
# Change directory to the cloned repository
|
28 |
+
WORKDIR /code-server
|
|
|
|
|
29 |
|
30 |
+
# Run CI script from the ci directory
|
31 |
+
RUN cd ci
|
32 |
|
33 |
+
# Copy entry point script
|
34 |
+
COPY entrypoint.sh /code-server/ci/entrypoint.sh
|
|
|
|
|
|
|
|
|
35 |
|
36 |
+
# Make entrypoint script executable
|
37 |
+
RUN chmod +x entrypoint.sh
|
|
|
|
|
|
|
|
|
38 |
|
39 |
+
# Expose port for code-server
|
40 |
EXPOSE 8080
|
41 |
+
|
42 |
+
# Set the entry point
|
43 |
+
ENTRYPOINT ["/code-server/entrypoint.sh"]
|
|
|
|
|
|
|
|