-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
Dockerfile
31 lines (27 loc) · 1.27 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
## yacy_grid_mcp Dockerfile
#
# Build:
# docker build -t yacy_grid_mcp .
#
# Run:
# docker run -d -p 127.0.0.1:8100:8100 --link yacy_grid_minio --link yacy_grid_rabbitmq --link yacy_grid_elasticsearch -e YACYGRID_GRID_S3_ADDRESS=admin:12345678@yacy_grid_minio:9000 -e YACYGRID_GRID_BROKER_ADDRESS=guest:guest@yacy_grid_rabbitmq:5672 -e YACYGRID_GRID_ELASTICSEARCH_ADDRESS=yacy_grid_elasticsearch:9300 --name yacy_grid_mcp yacy_grid_mcp
#
# Check if the service is running:
# curl http://localhost:8100/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/yacy_grid_mcp-0.0.1-SNAPSHOT-all.jar ./app/build/libs/
WORKDIR /app
EXPOSE 8100
# 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_mcp-0.0.1-SNAPSHOT-all.jar; fi
CMD ["java", "-Xms320M", "-Xmx2G", "-jar", "/app/build/libs/yacy_grid_mcp-0.0.1-SNAPSHOT-all.jar"]