-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (19 loc) · 977 Bytes
/
Dockerfile
File metadata and controls
31 lines (19 loc) · 977 Bytes
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
FROM ubuntu:latest AS builder
ARG WORKERD_VERSION
ARG TARGETARCH
WORKDIR /workdir
RUN apt-get update && apt-get install -y curl ca-certificates
RUN if [ ${TARGETARCH} = "amd64" ]; then curl -LO https://github.com/cloudflare/workerd/releases/download/${WORKERD_VERSION}/workerd-linux-64.gz; fi
RUN if [ ${TARGETARCH} = "arm64" ]; then curl -LO https://github.com/cloudflare/workerd/releases/download/${WORKERD_VERSION}/workerd-linux-arm64.gz; fi
RUN ls -la && gunzip workerd*.gz && mv workerd* workerd && chmod +x workerd
RUN mkdir lib && \
cp /lib/*-linux-gnu/libdl.so.2 lib/libdl.so.2 && \
cp /lib/*-linux-gnu/librt.so.1 lib/librt.so.1
FROM busybox:glibc
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /workdir/workerd /workerd
COPY --from=builder /workdir/lib /lib
WORKDIR /worker
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
ENTRYPOINT [ "/workerd" ]
CMD [ "serve", "worker.capnp" ]