lokinet/docker/router.Dockerfile
Michael 0b4d787042
More work on router docker image
- Multi-stage docker build (final image only 15MB!)
- Build in release mode
    - Fix bug with release mode
    - Fix compiler being dumb AF
    - Disable FORTIFY for now
- Enable LTO when making a staticly linked release
- Fix some gcc specific warnings
- Refactor cmake stuff into multiple files
2019-04-28 17:04:52 +01:00

20 lines
458 B
Docker

FROM alpine:latest as builder
RUN apk update && \
apk add build-base cmake git libcap-dev curl ninja bash binutils-gold
WORKDIR /src/
COPY . /src/
RUN make NINJA=ninja STATIC_LINK=ON BUILD_TYPE=Release
RUN ./lokinet-bootstrap
FROM alpine:latest
COPY lokinet-docker.ini /root/.lokinet/lokinet.ini
COPY --from=builder /src/build/lokinet .
COPY --from=builder /root/.lokinet/bootstrap.signed /root/.lokinet/
CMD ["./lokinet"]
EXPOSE 1090/udp 1190/tcp