mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-09 13:10:25 +00:00
0b4d787042
- 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
20 lines
458 B
Docker
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
|