-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
32 lines (24 loc) · 1 KB
/
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
28
29
30
31
32
# syntax=docker/dockerfile:1.12.0
ARG GO_VERSION=1.23.4
ARG REGISTRY="docker.io"
ARG RH_REGISTRY="registry.access.redhat.com"
FROM --platform=$BUILDPLATFORM ${REGISTRY}/tonistiigi/xx AS xx
FROM --platform=$BUILDPLATFORM ${REGISTRY}/golang:${GO_VERSION} AS builder
ARG TARGETOS
ARG TARGETARCH
COPY --from=xx / /
WORKDIR /app/aerospike-backup-service
COPY . .
RUN <<-EOF
xx-go --wrap
OS=${TARGETOS} ARCH=${TARGETARCH} make build
xx-verify /app/aerospike-backup-service/build/target/aerospike-backup-service_${TARGETOS}_${TARGETARCH}
EOF
FROM ${RH_REGISTRY}/ubi9/ubi-minimal:latest
ARG TARGETOS
ARG TARGETARCH
COPY --from=builder /app/aerospike-backup-service/build/target/aerospike-backup-service_${TARGETOS}_${TARGETARCH} /usr/bin/aerospike-backup-service
COPY --from=builder /app/aerospike-backup-service/config/config.yml /etc/aerospike-backup-service/aerospike-backup-service.yml
EXPOSE 8080
ENTRYPOINT ["aerospike-backup-service"]
CMD ["-c", "/etc/aerospike-backup-service/aerospike-backup-service.yml"]