-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (17 loc) · 591 Bytes
/
Copy pathDockerfile
File metadata and controls
27 lines (17 loc) · 591 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 golang:1.26-alpine3.22 as builder
LABEL org.opencontainers.image.authors="Łukasz Budnik <lukasz.budnik@gmail.com>"
ARG GIT_REF
ARG GIT_SHA
# build migrator
RUN mkdir -p /go/migrator
COPY . /go/migrator
RUN cd /go/migrator && \
go build -ldflags "-X main.GitSha=$GIT_SHA -X main.GitRef=$GIT_REF"
FROM alpine:3.24
LABEL org.opencontainers.image.authors="Łukasz Budnik <lukasz.budnik@gmail.com>"
COPY --from=builder /go/migrator/migrator /bin
VOLUME ["/data"]
# copy and register entrypoint script
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
EXPOSE 8080