Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use docker multi-stage builds #1

Merged
merged 2 commits into from
Nov 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
From openjdk:8-jre-slim
RUN apt-get update
RUN apt-get install curl -y
RUN curl -L https://github.com/Anuken/Mindustry/releases/download/v100/server-release.jar > server-release.jar
FROM alpine:3.10 AS download
RUN apk add --no-cache curl
RUN curl -o /server-release.jar -L https://github.com/Anuken/Mindustry/releases/download/v100/server-release.jar

FROM openjdk:8-jre-slim
COPY --from=download server-release.jar .
CMD java -jar server-release.jar
10 changes: 6 additions & 4 deletions script/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
From openjdk:8-jre-slim
RUN apt-get update
RUN apt-get install curl -y
RUN curl -L https://github.com/Anuken/Mindustry/releases/download/%%release%%/server-release.jar > server-release.jar
FROM alpine:3.10 AS download
RUN apk add --no-cache curl
RUN curl -o /server-release.jar -L https://github.com/Anuken/Mindustry/releases/download/%%release%%/server-release.jar

FROM openjdk:8-jre-slim
COPY --from=download server-release.jar .
CMD java -jar server-release.jar