-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (38 loc) · 1.36 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Base image from (http://phusion.github.io/baseimage-docker)
FROM openjdk:8u151-jre-alpine
# Override default value with 'docker build --build-arg BUILDTIME_CORDA_VERSION=version'
# example: 'docker build --build-arg BUILDTIME_CORDA_VERSION=1.0.0 -t corda/node:1.0 .'
ARG BUILDTIME_CORDA_VERSION=3.3
ARG BUILDTIME_JAVA_OPTIONS
ENV CORDA_VERSION=${BUILDTIME_CORDA_VERSION}
ENV JAVA_OPTIONS=${BUILDTIME_JAVA_OPTIONS}
# Set image labels
LABEL net.corda.version = ${CORDA_VERSION} \
maintainer = "<[email protected]>" \
vendor = "Consenso Labs"
RUN apk upgrade --update && \
apk add --update --no-cache bash iputils nss && \
rm -rf /var/cache/apk/* && \
# Add user to run the app && \
addgroup corda && \
adduser -G corda -D -s /bin/bash corda && \
# Create /opt/corda directory && \
mkdir -p /opt/corda/cordapps && \
mkdir -p /opt/corda/logs
# Copy corda jar
ADD --chown=corda:corda corda-${CORDA_VERSION}/corda.jar /opt/corda/corda.jar
ADD --chown=corda:corda corda-${CORDA_VERSION}/cordapps /opt/corda/cordapps/
COPY run-corda.sh /run-corda.sh
RUN chmod +x /run-corda.sh && \
sync && \
chown -R corda:corda /opt/corda
# Expose port for corda (default is 10002) and RPC
EXPOSE 10002
EXPOSE 10006
EXPOSE 10046
# Working directory for Corda
WORKDIR /opt/corda
ENV HOME=/opt/corda
USER corda
# Start it
CMD ["/run-corda.sh"]