Skip to content

Commit

Permalink
Merge pull request #1 from piccaso/msb
Browse files Browse the repository at this point in the history
Use docker multi-stage builds
  • Loading branch information
frankbaele authored Nov 20, 2019
2 parents d7c7f3e + d3a75f0 commit 1cc2412
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
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

0 comments on commit 1cc2412

Please sign in to comment.