-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
34 lines (28 loc) · 947 Bytes
/
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
34
FROM openjdk:17-jdk-alpine
ENV LAS2PEER_PORT=9011
ENV DATABASE_NAME=SHS
ENV DATABASE_HOST=127.0.0.1
ENV DATABASE_PORT=3306
ENV DATABASE_USER=root
ENV DATABASE_PASSWORD=password
ENV URL=https://limesurvey.tech4comp.dbis.rwth-aachen.de/index.php/admin/remotecontrol
ENV TZ=Europe/Berlin
RUN apk add --update bash mysql-client tzdata dos2unix curl && rm -f /var/cache/apk/*
RUN addgroup -g 1000 -S las2peer && \
adduser -u 1000 -S las2peer -G las2peer
COPY --chown=las2peer:las2peer . /src
WORKDIR /src
RUN chmod -R a+rwx /src
RUN chmod +x /src/docker-entrypoint.sh
# run the rest as unprivileged user
USER las2peer
RUN dos2unix gradlew
RUN dos2unix gradle.properties
RUN dos2unix /src/docker-entrypoint.sh
RUN chmod +x gradlew && ./gradlew build --exclude-task test
RUN chmod +x /src/docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh
EXPOSE $HTTP_PORT
EXPOSE $HTTPS_PORT
EXPOSE $LAS2PEER_PORT
ENTRYPOINT ["/src/docker-entrypoint.sh"]