Manofem commited on
Commit
347402f
·
verified ·
1 Parent(s): cf9ac58

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -32
Dockerfile CHANGED
@@ -1,11 +1,7 @@
1
- # syntax=docker/dockerfile:experimental
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
- # https://wiki.debian.org/Locale#Manually
30
- RUN sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen \
31
- && locale-gen
32
- ENV LANG=en_US.UTF-8
33
 
34
- RUN adduser --gecos '' --disabled-password coder \
35
- && echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
36
 
37
- RUN ARCH="$(dpkg --print-architecture)" \
38
- && curl -fsSL "https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-$ARCH.tar.gz" | tar -C /usr/local/bin -xzf - \
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
- COPY entrypoint.sh entrypoint.sh
45
- RUN --mount=from=packages,src=/tmp,dst=/tmp/packages dpkg -i /tmp/packages/code-server*$(dpkg --print-architecture).deb
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
- # This way, if someone sets $DOCKER_USER, docker-exec will still work as
53
- # the uid will remain the same. note: only relevant if -u isn't passed to
54
- # docker-run.
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"]