lander/Dockerfile

41 lines
716 B
Docker

FROM alpine:3.16.3 AS builder
ARG DI_VER=1.2.5
RUN apk add --update --no-cache \
build-base \
make \
cmake \
boost-dev \
curl
WORKDIR /app
# Build dumb-init
RUN curl -Lo - "https://github.com/Yelp/dumb-init/archive/refs/tags/v${DI_VER}.tar.gz" | tar -xzf - && \
cd "dumb-init-${DI_VER}" && \
make SHELL=/bin/sh && \
mv dumb-init .. && \
cd ..
COPY . ./
RUN make prod && \
strip build/Release/lander
FROM alpine:3.16.3
RUN apk add --update --no-cache boost && \
mkdir /data && \
chown -R 1000:1000 /data
COPY --from=builder /app/build/Release/lander /app/dumb-init /bin/
WORKDIR /data
USER 1000:1000
ENTRYPOINT ["/bin/dumb-init", "--"]
CMD ["/bin/lander"]