diff --git a/Dockerfile b/Dockerfile index c2658c75..76140514 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,33 +1,36 @@ -FROM ubuntu:15.04 +FROM debian:8.5 MAINTAINER eiabea # Install required Debian packages RUN set -ex \ - && echo "deb http://us.archive.ubuntu.com/ubuntu vivid main universe" | tee -a /etc/apt/sources.list \ && apt-get update -q \ - && apt-get install -q -y build-essential libssl-dev libffi-dev python-dev openssl python-pip libzmq3-dev libsodium-dev autoconf automake pkg-config libtool git \ - && apt-get clean autoclean -q -y \ - && apt-get autoremove -q -y \ - && rm -rf /var/lib/apt/lists/* /var/lib/apt/lists/partial/* /tmp/* /var/tmp/* + && apt-get upgrade -y -q \ + && apt-get install -y -q git autoconf pkg-config libtool build-essential libssl-dev libffi-dev python-dev openssl python-pip libzmq3-dev + +# Install cryptography and pylint +WORKDIR / +RUN pip install cryptography # Install libzmq from github RUN git clone https://github.com/zeromq/libzmq WORKDIR /libzmq -RUN ./autogen.sh -RUN ./configure -RUN make -RUN make install -RUN ldconfig +RUN set -ex \ + && ./autogen.sh \ + && ./configure \ + && make \ + && make check \ + && make install \ + && ldconfig -# Install cryptography -WORKDIR / -RUN pip install cryptography +# Install python packages +RUN pip install --upgrade cffi +RUN pip install pynacl # Install Openbazaar-Server from github +WORKDIR / RUN git clone https://github.com/OpenBazaar/OpenBazaar-Server.git WORKDIR /OpenBazaar-Server/ -RUN pip install -r requirements.txt -r test_requirements.txt -RUN make +RUN pip install -r requirements.txt # Copy entrypoint script and mark it executable COPY ./docker-entrypoint.sh /docker-entrypoint.sh @@ -40,5 +43,10 @@ RUN chown -R openbazaar:openbazaar /OpenBazaar-Server VOLUME /root/.openbazaar VOLUME /ssl +EXPOSE 18466 +EXPOSE 18467 +EXPOSE 18469 +EXPOSE 18470 + ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["python", "openbazaard.py", "start"] +CMD python openbazaard.py start -a 0.0.0.0 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 4204a7c9..fdd1b316 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,15 +3,14 @@ version: "2" services: openbazaard: build: "." - network_mode: "host" ports: + - "18466:18466" - "18467:18467" - "18469:18469/udp" - - "18466:18466" - "18470:18470" volumes: - "./data:/root/.openbazaar" - - "./ssl:/ssl" + - "./ssl:/ssl:ro" environment: # Should be changed to more secure values - "OB_USERNAME=username" diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 27ee3243..7912c3c9 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -45,4 +45,4 @@ if [ "$OB_SSL" = true ] ; then fi echo "Executing ${@}" -exec "$@" +exec "$@" \ No newline at end of file