summary refs log tree commit diff
path: root/Dockerfile
blob: 3f3de0fc5accd9cc2204b7f1ee489ecae165399c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
FROM alpine:latest AS build
WORKDIR /build
RUN apk update && \
    apk add --no-cache gcc musl-dev postgresql-dev

COPY service.c .
RUN gcc -o service service.c -lpq

FROM postgres:alpine

COPY script.sh .
COPY --from=build /build/service .

ENTRYPOINT ["./script.sh"]