Skip to content

Commit

Permalink
#237 - Minor suggestions to improve the container image
Browse files Browse the repository at this point in the history
- switch to temurin 22 alpine base image
- reorder cmds to decrease img size
  • Loading branch information
michael-82 committed Sep 10, 2024
1 parent ce47409 commit a11f296
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ jobs:
org.opencontainers.image.title=feasibility backend
org.opencontainers.image.description=Provides backend functions for feasibility UI including query execution
- name: Set up JDK 17
- name: Set up JDK 22
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
java-version: 22

- name: Cache Local Maven Repo
uses: actions/cache@v4
Expand Down Expand Up @@ -205,11 +205,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
- name: Set up JDK 22
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
java-version: 22

- name: Cache Local Maven Repo
uses: actions/cache@v4
Expand Down
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
FROM eclipse-temurin:22-jre@sha256:26bd835ee107ae775d85f1ff8c55abc799f514fb4201e65981857041d18826c1

RUN apt-get update -yqq && apt-get upgrade -yqq && \
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/
FROM eclipse-temurin@sha256:d8ac5f15b7dc0a91bdfb89422f900383469e5de12dcce3949f145d713f455b34

WORKDIR /opt/dataportal-backend
COPY ./target/*.jar ./dataportal-backend.jar
COPY ontology ontology

ARG VERSION=6.0.0
ENV APP_VERSION=${VERSION}
Expand All @@ -25,5 +20,8 @@ USER 10001

HEALTHCHECK --interval=5s --start-period=10s CMD curl -s -f http://localhost:8090/actuator/health || exit 1

COPY ./target/*.jar ./dataportal-backend.jar
COPY ontology ontology
COPY ./docker-entrypoint.sh /

ENTRYPOINT ["/bin/bash", "/docker-entrypoint.sh"]

0 comments on commit a11f296

Please sign in to comment.