haveno/pricenode/docker/Dockerfile

34 lines
875 B
Docker
Raw Normal View History

2021-05-04 20:20:01 -04:00
###
2022-03-19 14:04:23 -04:00
# Haveno pricenode dockerfile
2021-05-04 20:20:01 -04:00
###
# pull base image
2022-03-19 14:04:23 -04:00
FROM openjdk:11-jdk
2021-05-04 20:20:01 -04:00
2022-03-19 14:04:23 -04:00
# install tor
2021-05-04 20:20:01 -04:00
RUN apt-get update && apt-get install -y --no-install-recommends \
2022-03-19 14:04:23 -04:00
tor && rm -rf /var/lib/apt/lists/*
2021-05-04 20:20:01 -04:00
2022-03-19 14:04:23 -04:00
# copy tor configuration file
2021-05-04 20:20:01 -04:00
COPY torrc /etc/tor/
2022-03-19 14:04:23 -04:00
# give proper permissions for tor configuration file
RUN chown debian-tor:debian-tor /etc/tor/torrc
# add haveno user
RUN useradd -d /haveno -G debian-tor haveno
# make haveno directory
RUN mkdir -p /haveno
# give haveno user proper permissions
RUN chown haveno:haveno /haveno
# clone haveno repository
RUN git clone https://github.com/haveno-dex/haveno.git /haveno/haveno
# build pricenode
WORKDIR /haveno/haveno
RUN ./gradlew :pricenode:installDist -x test
# set proper java options
ENV JAVA_OPTS=""
# expose ports
EXPOSE 80
EXPOSE 8078
# set launch command (tor and pricenode)
CMD tor && /haveno/haveno/haveno-pricenode 2