forked from linux-do/cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (19 loc) · 713 Bytes
/
Dockerfile
File metadata and controls
27 lines (19 loc) · 713 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
FROM alpine:latest
# set the time zone to Beijing Time in the Eastern 8th Time Zone
RUN apk add --no-cache tzdata && \
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone
WORKDIR /app
# set build arg for platform
ARG TARGETPLATFORM
# copy all binaries into image
COPY cdk-server-amd64 .
COPY cdk-server-arm64 .
# select binary according to platform
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then cp cdk-server-amd64 cdk-server; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then cp cdk-server-arm64 cdk-server; fi
# copy docs and support files
COPY docs ./docs
COPY support-files ./support-files
EXPOSE 8000
# set entrypoint
ENTRYPOINT ["./cdk-server"]