-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Build Out of Docker Build Container
In the Docker build container, artefacts can't be cached. So building outside will be faster.
- Loading branch information
1 parent
0936f41
commit 08324b8
Showing
5 changed files
with
37 additions
and
18 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 |
---|---|---|
@@ -1,7 +1,2 @@ | ||
* | ||
!modules | ||
!resources | ||
!src | ||
!Dockerfile | ||
!deps.edn | ||
!pom.xml | ||
!target |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ target | |
/nginx.conf | ||
.cpcache | ||
.cache | ||
.env |
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,22 +1,18 @@ | ||
FROM clojure:openjdk-11-tools-deps-1.10.1.727 as build | ||
|
||
COPY . /build/ | ||
|
||
WORKDIR /build | ||
RUN clojure -X:depstar uberjar :jar target/blaze-standalone.jar | ||
FROM busybox as build | ||
|
||
RUN mkdir -p /app/data | ||
|
||
FROM gcr.io/distroless/java-debian10:11 | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=build --chown=nonroot:nonroot /app ./ | ||
COPY --from=build --chown=nonroot:nonroot /build/target/ ./ | ||
COPY --from=build --chown=nonroot:nonroot /app /app | ||
COPY --chown=nonroot:nonroot target/blaze-standalone.jar /app/ | ||
|
||
WORKDIR /app | ||
USER nonroot | ||
|
||
ENV STORAGE="standalone" | ||
ENV INDEX_DB_DIR="/app/data/index" | ||
ENV TRANSACTION_DB_DIR="/app/data/transaction" | ||
ENV RESOURCE_DB_DIR="/app/data/resource" | ||
|
||
CMD ["blaze-standalone.jar", "-m", "blaze.core"] |
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