-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (43 loc) · 1.23 KB
/
Dockerfile
File metadata and controls
57 lines (43 loc) · 1.23 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#
# Clone image
#
FROM alpine/git as clone
RUN git clone -b master https://github.com/iotaledger/iri.git /iri
#
# Build image
#
FROM maven:3.5-jdk-8-alpine as build
WORKDIR /iri
COPY --from=clone /iri /iri
RUN mvn clean package -DskipTests=true
#
# Execution image
#
FROM openjdk:8-slim
COPY --from=build /iri/target/iri*.jar /iri/target/
COPY conf/* /iri/conf/
COPY docker-entrypoint.sh /
# Allow change of ports in the container.
ENV API_PORT 14265
ENV TCP_PORT 15600
# Allow change of bind address
ENV TCP_SOCKET_ADDRESS "0.0.0.0"
# Default jvm arguments
ENV JAVA_OPTIONS "-XX:+DisableAttachMechanism -XX:+HeapDumpOnOutOfMemoryError"
# Example to make java use docker's memory limits to change its own memory configuration
# (https://blogs.oracle.com/java-platform-group/java-se-support-for-docker-cpu-and-memory-limits)
#
# ENV JAVA_OPTIONS "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"
# Default java memory settings
ENV MIN_MEMORY 2G
ENV MAX_MEMORY 4G
# Default remote api limitations
ENV REMOTE_API_LIMIT "attachToTangle, addNeighbors, removeNeighbors"
# Mark ports for expose
EXPOSE $API_PORT
EXPOSE $TCP_PORT
WORKDIR /iri/data
# Define volumes
VOLUME /iri/data
VOLUME /iri/conf
ENTRYPOINT ["/docker-entrypoint.sh"]