-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makes Dockerfile to multi stage build
Eliminates a compile time warning
- Loading branch information
root
committed
Jan 28, 2021
1 parent
885f61d
commit 6bf8950
Showing
4 changed files
with
14 additions
and
16 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -4,24 +4,22 @@ | |
# https://github.com/hyper-prog/hasses | ||
# | ||
|
||
FROM alpine | ||
LABEL maintainer="[email protected]" Description="Hasses asynchronous SSE server" | ||
|
||
RUN apk update \ | ||
&& apk add openssl | ||
FROM alpine AS hassesbuildstage | ||
RUN apk update && apk add openssl | ||
COPY . /hasses/ | ||
RUN apk add libc-dev gcc make openssl-dev \ | ||
&& cd /hasses \ | ||
&& make && make install \ | ||
&& cd / && rm -rf /hasses \ | ||
&& apk del libc-dev gcc make openssl-dev \ | ||
&& mkdir /hassescommon | ||
&& make && make install | ||
|
||
|
||
FROM alpine AS hassesdaemon | ||
LABEL maintainer="[email protected]" Description="Hasses asynchronous SSE server" | ||
RUN apk update && apk add openssl | ||
COPY --from=hassesbuildstage /usr/local/bin/hasses /usr/local/bin/ | ||
|
||
EXPOSE 8080 | ||
EXPOSE 8085 | ||
|
||
VOLUME ["/hassescommon"] | ||
|
||
CMD ["-p=8080","-cp=8085","-murl=/sse","-nodaemon"] | ||
# Srart hasses daemon when container runs | ||
ENTRYPOINT ["/usr/local/bin/hasses"] |
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
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
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