Activity-Relay/Dockerfile

17 lines
432 B
Docker

FROM golang:1.18-alpine AS build
WORKDIR /Activity-Relay
COPY ./app /Activity-Relay
RUN mkdir -p /rootfs/usr/bin && \
apk add -U --no-cache git && \
go build -o /rootfs/usr/bin/relay -ldflags "-X main.version=$(git describe --tags HEAD)" .
FROM alpine
COPY ./actor.pem /var/lib/relay/
COPY --from=build /rootfs/usr/bin /usr/bin
RUN chmod +x /usr/bin/relay && \
apk add -U --no-cache ca-certificates
EXPOSE 8080