-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Features/reduce image size of bq extractor (#279)
* Change from openjdk to alpine, reduce image size from 600 something to 40 something mb * Make a smaller, quicker java image * Copy from the test dockerfile to the prod dockerfile * Fixing typo
- Loading branch information
Showing
4 changed files
with
55 additions
and
8 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,10 +1,28 @@ | ||
FROM openjdk:8u171 | ||
FROM alpine:3.7 | ||
|
||
MAINTAINER CSI "[email protected]" | ||
|
||
# | ||
# Copy the files we need | ||
# | ||
|
||
COPY script/start.sh /start.sh | ||
COPY config/config.yaml /config/config.yaml | ||
|
||
COPY build/libs/bq-metrics-extractor-uber.jar /bq-metrics-extractor.jar | ||
|
||
CMD ["/start.sh"] | ||
# | ||
# Load, then dump the standard java classes into the | ||
# image being built, to speed up java load time | ||
# using Class Data Sharing. The "quit" command will | ||
# simply quit the program after it's dumped the list of | ||
# classes that should be cached. | ||
# | ||
|
||
CMD ["java", "-Dfile.encoding=UTF-8", "-Xshare:on", "-Xshare:dump", "-jar", "/bq-metrics-extractor.jar", "quit", "config/config.yaml"] | ||
|
||
|
||
# | ||
# Finally the actual entry point | ||
# | ||
|
||
ENTRYPOINT ["/start.sh"] |
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,11 +1,29 @@ | ||
FROM openjdk:8u171 | ||
FROM alpine:3.7 | ||
|
||
MAINTAINER CSI "[email protected]" | ||
|
||
# | ||
# Copy the files we need | ||
# | ||
|
||
COPY script/start.sh /start.sh | ||
COPY config/pantel-prod.json /secret/pantel-prod.json | ||
COPY config/config.yaml /config/config.yaml | ||
|
||
COPY build/libs/bq-metrics-extractor-uber.jar /bq-metrics-extractor.jar | ||
|
||
CMD ["/start.sh"] | ||
# | ||
# Load, then dump the standard java classes into the | ||
# image being built, to speed up java load time | ||
# using Class Data Sharing. The "quit" command will | ||
# simply quit the program after it's dumped the list of | ||
# classes that should be cached. | ||
# | ||
|
||
CMD ["java", "-Dfile.encoding=UTF-8", "-Xshare:on", "-Xshare:dump", "-jar", "/bq-metrics-extractor.jar", "quit", "config/config.yaml"] | ||
|
||
|
||
# | ||
# Finally the actual entry point | ||
# | ||
|
||
ENTRYPOINT ["/start.sh"] |
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