-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
27 lines (20 loc) · 919 Bytes
/
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
FROM nimlang/nim:1.6.2-alpine AS base
WORKDIR /work
################################################################################
# builder stages
################################################################################
FROM base AS websh_server_builder
COPY websh_server/ /work
RUN nimble build -Y -d:release
FROM base AS websh_remover_builder
COPY websh_remover/ /work
RUN nimble build -Y -d:release
################################################################################
# runtime stages
################################################################################
FROM alpine:3.15.0 AS websh_server_runtime
COPY --from=websh_server_builder /work/bin/websh_server /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/websh_server"]
FROM alpine:3.15.0 AS websh_remover_runtime
COPY --from=websh_remover_builder /work/bin/websh_remover /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/websh_remover"]