Skip to content

Commit

Permalink
Docker: переходим на alpine-image (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyberorg committed Jul 18, 2022
1 parent bb6eeac commit 057db8a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 23 deletions.
13 changes: 6 additions & 7 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.idea
.run
node_modules
.gitignore
checkstyle.xml
README.md

# Ignore everything
**
# But JAR should stay
!target/whoami.jar
# Add entrypoint
!docker-entrypoint.sh
6 changes: 1 addition & 5 deletions .run/Dockerfile.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
<configuration default="false" name="Dockerfile" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
<deployment type="dockerfile">
<settings>
<option name="imageTag" value="" />
<option name="buildCliOptions" value="" />
<option name="command" value="" />
<option name="containerName" value="" />
<option name="entrypoint" value="" />
<option name="commandLineOptions" value="" />
<option name="showCommandPreview" value="true" />
<option name="sourceFilePath" value="Dockerfile" />
</settings>
</deployment>
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ VOLUME /tmp
COPY ./target/whoami.jar /app/
COPY ./docker-entrypoint.sh /

RUN sh -c 'chmod +x /docker-entrypoint.sh'

RUN chmod +x /docker-entrypoint.sh
# RUN ls -al /
ENTRYPOINT /docker-entrypoint.sh

EXPOSE 8080
Expand Down
10 changes: 1 addition & 9 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

JAVA_OPTS=${JAVA_OPTS}

Expand All @@ -14,14 +14,6 @@ export JAVA_OPTS="$JAVA_OPTS -XX:+UseContainerSupport"
export JAVA_OPTS="$JAVA_OPTS -XX:+AlwaysActAsServerClassMachine"
export JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/dumps"

## Issue 264 (OpenJ9 tuning). Based on https://yals.ee/dUxHlC
export JAVA_OPTS="$JAVA_OPTS -Xgcpolicy:gencon"
export JAVA_OPTS="$JAVA_OPTS -Xquickstart"
export JAVA_OPTS="$JAVA_OPTS -Xtune:virtualized"
export JAVA_OPTS="$JAVA_OPTS -XX:+ClassRelationshipVerifier"
export JAVA_OPTS="$JAVA_OPTS -XX:+TransparentHugePage"
## End OpenJ9 tuning

# Vaadin Production Mode #
export JAVA_OPTS="$JAVA_OPTS -Dvaadin.production=true"
# End Vaadin Production Mode #
Expand Down

0 comments on commit 057db8a

Please sign in to comment.