forked from wasmCloud/wadm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (19 loc) · 599 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 debian:bullseye-slim AS base
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y ca-certificates
FROM base AS base-amd64
ARG BIN_AMD64
ARG BIN=$BIN_AMD64
FROM base AS base-arm64
ARG BIN_ARM64
ARG BIN=$BIN_ARM64
FROM base-$TARGETARCH
ARG USERNAME=wadm
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN addgroup --gid $USER_GID $USERNAME \
&& adduser --disabled-login -u $USER_UID --ingroup $USERNAME $USERNAME
# Copy application binary from disk
COPY --chown=$USERNAME ${BIN} /usr/local/bin/wadm
USER $USERNAME
# Run the application
ENTRYPOINT ["/usr/local/bin/wadm"]