-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (28 loc) · 744 Bytes
/
Dockerfile
File metadata and controls
40 lines (28 loc) · 744 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
32
33
34
35
36
37
38
39
40
# Base stage
FROM ubuntu:22.04 AS base
# Dependencies stage
FROM base AS deps
# Define build arguments
ARG GIT_REPO
ARG BINARY
RUN apt-get update && \
apt-get install -y --no-install-recommends wget ca-certificates net-tools && \
rm -rf /var/lib/apt/lists/*
# Builder stage
FROM deps AS builder
# Use build arguments
ARG GIT_REPO
ARG BINARY
RUN wget ${GIT_REPO} -O /${BINARY} && \
chmod +x /${BINARY}
# Runner stage
FROM base AS runner
# Define environment variables
ARG BINARY
COPY --from=builder /${BINARY} /${BINARY}
COPY entrypoint.sh /entrypoint.sh
COPY config/_app.toml /app.toml
COPY config/_client.toml /client.toml
COPY config/_config.toml /config.toml
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]