-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
27 lines (23 loc) · 986 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
## yacy_grid_loader dockerfile
## examples:
# docker build -t yacy_grid_loader .
# docker run -d --rm -p 8200:8200 --name yacy_grid_loader yacy_grid_loader
## Check if the service is running:
# curl http://localhost:8200/yacy/grid/mcp/info/status.json
# build app
FROM eclipse-temurin:8-jdk-focal AS appbuilder
COPY ./ /app
WORKDIR /app
RUN ./gradlew clean shadowDistTar
# build dist
FROM eclipse-temurin:8-jre-focal
LABEL maintainer="Michael Peter Christen <mc@yacy.net>"
ENV DEBIAN_FRONTEND noninteractive
ARG default_branch=master
COPY ./conf /app/conf/
COPY --from=appbuilder /app/build/libs/ ./app/build/libs/
WORKDIR /app
EXPOSE 8200
# for some weird reason the jar file is sometimes not named correctly
RUN if [ -e /app/build/libs/app-0.0.1-SNAPSHOT-all.jar ] ; then mv /app/build/libs/app-0.0.1-SNAPSHOT-all.jar /app/build/libs/yacy_grid_loader-0.0.1-SNAPSHOT-all.jar; fi
CMD ["java", "-Xms320M", "-Xmx3G", "-jar", "/app/build/libs/yacy_grid_loader-0.0.1-SNAPSHOT-all.jar"]