2022-01-13 13:51:02 +01:00
|
|
|
FROM chewingbever/vlang:latest AS builder
|
2022-01-09 09:29:11 +01:00
|
|
|
|
2022-01-13 13:51:02 +01:00
|
|
|
WORKDIR /app
|
2022-01-09 09:29:11 +01:00
|
|
|
|
2022-01-13 13:51:02 +01:00
|
|
|
# Copy over source code & build production binary
|
|
|
|
COPY src ./src
|
|
|
|
COPY Makefile ./
|
2022-01-15 10:36:23 +01:00
|
|
|
|
|
|
|
ENV LDFLAGS='-lz -lbz2 -llzma -lexpat -lzstd -llz4 -static'
|
2022-01-15 11:18:05 +01:00
|
|
|
RUN v -o pvieter -cflags "-O3" src
|
2022-01-09 09:29:11 +01:00
|
|
|
|
|
|
|
|
2022-01-13 13:51:02 +01:00
|
|
|
FROM alpine:3.15
|
2022-01-09 09:29:11 +01:00
|
|
|
|
|
|
|
ENV REPO_DIR=/data
|
|
|
|
|
2022-01-13 13:51:02 +01:00
|
|
|
COPY --from=builder /app/pvieter /usr/local/bin/vieter
|
2022-01-09 09:29:11 +01:00
|
|
|
|
|
|
|
ENTRYPOINT [ "/usr/local/bin/vieter" ]
|