-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
33 lines (24 loc) · 1.05 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Dockerfile to build and run the Itarazzo Client
FROM maven:3.8.1-openjdk-17-slim
# meta
LABEL maintainer="leidenheit <X: @leidenheit>"
LABEL description="Itarazzo Client for running workflow tests based on Arazzo Specifications"
LABEL license="Apache-2.0"
# create non-root user with group
RUN groupadd -g 1001 -r runners && useradd -u 1001 -r -g runners itarazzobot && \
# create necessary directories and set appropriate permissions
mkdir -p /itarazzo/target /itarazzo/resources /home/itarazzobot/.m2/repository && \
chown -R itarazzobot:runners /itarazzo /home/itarazzobot/.m2
# set working directory
WORKDIR /itarazzo
# copy sources and set ownership
COPY --chown=itarazzobot:runners . /itarazzo
COPY --chown=itarazzobot:runners src/main/resources/init/entrypoint.sh /entrypoint.sh
# make script executable
RUN chmod +x /entrypoint.sh
# switch to non-root user
USER itarazzobot
# fire it up
ENTRYPOINT ["/entrypoint.sh"]
# debug: keep container running if entrypoint script ends
#CMD ["tail", "-f", "/dev/null"]