-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (16 loc) · 809 Bytes
/
Dockerfile
File metadata and controls
22 lines (16 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM openjdk:26-ea-26-jdk-slim@sha256:d03b77f66df3ff37be1665c34b32d4d9d19d735aa4e5c0aaec993db699e0e6d4
# Create a custom user with UID 1234 and GID 1234
# https://www.docker.com/blog/understanding-the-docker-user-instruction/
RUN groupadd -g 1234 runner-group && \
useradd -m -u 1234 -g runner-group runner
# Set the directory for executing future commands
WORKDIR /home/runner
# Extract from .tar and copy the app files from host machine to image filesystem
ADD hello/build/distributions/hello-*.tar .
RUN mv hello-* app && chown -R runner:runner-group app && mkdir data && chown -R runner:runner-group data
# Switch to the custom user
USER runner
# Run the Main class
# https://docs.docker.com/reference/build-checks/json-args-recommended/
ENTRYPOINT ["/home/runner/app/bin/hello"]
EXPOSE 8080/tcp