forked from cathugger/mkp224o
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't use volume, use latest alpine so i won't need to bump it use multistage static build for minimal size with stripping correctly save git version details
- Loading branch information
Showing
2 changed files
with
14 additions
and
22 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,14 @@ | ||
FROM alpine:3.12.0 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
#Installing all the dependencies | ||
RUN apk add --no-cache gcc libsodium-dev make autoconf build-base | ||
|
||
WORKDIR /mkp224o | ||
|
||
COPY . /mkp224o/ | ||
|
||
RUN ./autogen.sh \ | ||
&& ./configure \ | ||
&& make \ | ||
&& cp /mkp224o/mkp224o /usr/local/bin/ | ||
|
||
VOLUME /root/data | ||
|
||
WORKDIR /root/data | ||
|
||
ENTRYPOINT ["mkp224o"] | ||
FROM alpine:latest AS builder | ||
RUN apk add --no-cache gcc libc-dev libsodium-dev libsodium-static make autoconf git | ||
WORKDIR /app | ||
COPY . . | ||
RUN ./autogen.sh | ||
RUN ./configure --enable-amd64-51-30k CFLAGS="-O3 -march=x86-64 -mtune=generic -fomit-frame-pointer" LDFLAGS="-static" | ||
RUN make | ||
RUN strip mkp224o | ||
|
||
FROM scratch | ||
WORKDIR /app | ||
COPY --from=builder /app/mkp224o . | ||
|
||
ENTRYPOINT ["./mkp224o"] |