Skip to content

Commit ddb9920

Browse files
committed
Use amazoncorretto instead of openjdk for arm support. Simplify docker build.
1 parent b3f3977 commit ddb9920

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

Dockerfile

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
# This line tells Docker to base an image on a pre-built image with Alpine Linux. You can use other images from OpenJDK
2-
# registry. Alpine Linux benefit is that the image is pretty small. We also select JRE-only image since we don't need
3-
# to compile code on the image, only run precompiled classes.
4-
FROM adoptopenjdk/openjdk11:alpine-jre
5-
6-
# If for some reason you wish to use the full JDK, the following line can be used
7-
# FROM adoptopenjdk/openjdk11:alpine
8-
9-
ARG PROJECT_VERSION
10-
RUN echo "Project version set to -> ${PROJECT_VERSION}"
1+
# This line tells Docker to base an image on a pre-built image with Alpine Linux. You can use other images from Amazon
2+
# Corretto registry. Alpine Linux benefit is that the image is pretty small.
3+
FROM amazoncorretto:11-alpine3.19
114

125
ENV APPLICATION_USER ktor
136
RUN adduser -D -g '' $APPLICATION_USER
@@ -18,7 +11,7 @@ RUN chown -R $APPLICATION_USER /app
1811
USER $APPLICATION_USER
1912

2013
# These lines copy the packaged application into the Docker image and sets the working directory to where it was copied.
21-
COPY ./build/libs/validator-wrapper-jvm-${PROJECT_VERSION}.jar /app/validator-wrapper.jar
14+
COPY ./build/libs/validator-wrapper-jvm-*.jar /app/validator-wrapper.jar
2215
WORKDIR /app
2316

2417
# Environment vars here

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ version: '3'
22
services:
33
validator:
44
image: markiantorno/validator-wrapper
5+
build:
6+
context: .
57
restart: always
68
ports:
79
- 3500:3500

0 commit comments

Comments
 (0)