@@ -14,7 +14,32 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry,id=${TARGETPLATFORM} --m
14
14
15
15
16
16
FROM debian:bookworm-slim
17
+ ARG TARGETARCH
18
+ ARG USE_CODE_SERVER_INTEGRATION
19
+ ENV USE_CODE_SERVER_INTEGRATION ${USE_CODE_SERVER_INTEGRATION}
20
+ ENV DENO_VERSION 1.40.3
21
+ ENV CODE_SERVER_VERSION 4.20.0
22
+ ENV CODE_SERVER_HOST 0.0.0.0
23
+ ENV CODE_SERVER_PORT 8999
24
+ ENV CODE_SERVER_EXTENSIONS denoland.vscode-deno
17
25
RUN apt-get update && apt-get install -y libssl-dev && rm -rf /var/lib/apt/lists/*
18
26
RUN apt-get remove -y perl && apt-get autoremove -y
19
27
COPY --from=builder /root/edge-runtime /usr/local/bin/edge-runtime
20
- ENTRYPOINT ["edge-runtime" ]
28
+ COPY ./bin/entrypoint.sh /usr/local/bin
29
+ RUN chmod u+x /usr/local/bin/entrypoint.sh
30
+
31
+ # vscode-server integration
32
+ RUN if [ -n "$USE_CODE_SERVER_INTEGRATION" ]; then \
33
+ apt-get update && apt-get install -y ca-certificates curl wget unzip dumb-init \
34
+ && wget https://github.com/coder/code-server/releases/download/v${CODE_SERVER_VERSION}/code-server_${CODE_SERVER_VERSION}_${TARGETARCH}.deb -P /tmp \
35
+ && dpkg -i /tmp/code-server_${CODE_SERVER_VERSION}_${TARGETARCH}.deb \
36
+ && rm -f /tmp/code-server_${CODE_SERVER_VERSION}_${TARGETARCH}.deb; \
37
+ if [ "${TARGETARCH}" = "arm64" ]; then \
38
+ wget https://github.com/LukeChannings/deno-arm64/releases/download/v${DENO_VERSION}/deno-linux-arm64.zip -P /tmp \
39
+ && unzip /tmp/deno-linux-arm64.zip -d /usr/local/bin; \
40
+ else \
41
+ curl -fsSL https://deno.land/install.sh | DENO_INSTALL=/usr/local sh; \
42
+ fi \
43
+ fi
44
+
45
+ ENTRYPOINT ["dumb-init" , "--" , "/usr/local/bin/entrypoint.sh" ]
0 commit comments