-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile
64 lines (50 loc) · 1.72 KB
/
dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM debian:bullseye-slim
LABEL maintainer="https://github.com/harshau007"
LABEL createdBy="DevBox"
RUN apt-get update && apt-get install -y curl ca-certificates software-properties-common
ARG ADDITIONAL_PACKAGES
ARG ADDITIONAL_PORT
ARG TEMPLATE_NAME
RUN if [ -n "$ADDITIONAL_PACKAGES" ]; then \
case "$ADDITIONAL_PACKAGES" in \
"nodelts") \
curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
apt-get install -y nodejs ;; \
"node21") \
curl -fsSL https://deb.nodesource.com/setup_21.x | bash - && \
apt-get install -y nodejs ;; \
"node18") \
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs ;; \
"python") \
apt-get install -y python3 python3-pip ;; \
"rust") \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ;; \
"go") \
add-apt-repository ppa:longsleep/golang-backports && \
apt-get update && \
apt-get install -y golang-go ;; \
"java8") \
apt-get install -y openjdk-8-jdk ;; \
"java11") \
apt-get install -y openjdk-11-jdk ;; \
"java17") \
apt-get install -y openjdk-17-jdk ;; \
"java20") \
apt-get install -y openjdk-20-jdk ;; \
"java21") \
apt-get install -y openjdk-21-jdk ;; \
*) \
echo $ADDITIONAL_PACKAGES ;; \
esac; \
fi
RUN curl -fsSL https://code-server.dev/install.sh | sh \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY settings.json /root/.local/share/code-server/User/settings.json
EXPOSE 8080
WORKDIR /home/coder
COPY setup.sh /usr/local/bin/setup.sh
RUN chmod +x /usr/local/bin/setup.sh
# Start code-server
ENTRYPOINT [ "/usr/local/bin/setup.sh" ]