Use packed files to build docker image

This commit is contained in:
Jakob Gillich 2020-06-09 23:21:46 +02:00
parent 8424fcfe68
commit 170549982c
No known key found for this signature in database
GPG key ID: FD8BF52DB8452C91
2 changed files with 12 additions and 8 deletions

1
.dockerignore Symbolic link
View file

@ -0,0 +1 @@
.gitignore

View file

@ -1,16 +1,19 @@
FROM mozilla/sbt:8u232_1.3.8
EXPOSE 51000
EXPOSE 51001
EXPOSE 51002
FROM mozilla/sbt:8u232_1.3.8 as builder
COPY . /PSF-LoginServer
WORKDIR /PSF-LoginServer
RUN wget https://github.com/psforever/PSCrypto/releases/download/v1.1/pscrypto-lib-1.1.zip && \
unzip pscrypto-lib-1.1.zip && rm pscrypto-lib-1.1.zip
unzip pscrypto-lib-1.1.zip && rm pscrypto-lib-1.1.zip && \
sbt pack
RUN sbt compile
FROM openjdk:8u252-slim
CMD ["sbt", "pslogin/run"]
COPY --from=builder /PSF-LoginServer/target/pack/ /usr/local
EXPOSE 51000
EXPOSE 51001
EXPOSE 51002
CMD ["ps-login"]