prepare for dockerizing

This commit is contained in:
2021-09-21 15:46:55 +02:00
parent 258177fcdb
commit 3b6f05dbc2
4 changed files with 43 additions and 3 deletions

34
Dockerfile Normal file
View File

@ -0,0 +1,34 @@
FROM alpine:3.13 AS builder
ARG VERSION
COPY sink/ /tmp/sink
RUN \
apk update && \
apk add alpine-sdk && \
apk add libconfig-dev && \
apk add postgresql-dev && \
cd /tmp/sink && \
make VERSION=${VERSION}
FROM alpine:3.13
COPY --from=builder /tmp/sink/build/sink20169 /usr/local/bin/
RUN \
apk add --no-cache libpq && \
apk add --no-cache libconfig && \
mkdir /etc/sink
EXPOSE 20169/udp
VOLUME /etc/sink
CMD [ "/usr/local/bin/sink20169", "-f", "/etc/sink/sink20169.cfg", "-n", "nobody", "-v" ]