Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
FROM alpine:3.4
FROM python:2 AS compile-image

RUN apt-get update && apt-get install -y --no-install-recommends python-dev

WORKDIR /app
RUN git clone --depth 1 git://github.com/braiins/stratum.git

WORKDIR /app/stratum-mining-proxy
COPY . ./

WORKDIR /app/stratum-mining-proxy/midstatec
RUN make

WORKDIR /app/stratum-mining-proxy

RUN virtualenv /opt/venv
# Make sure we use the virtualenv:
ENV PATH="/opt/venv/bin:$PATH"
RUN pip install ../stratum/ && pip install .

FROM python:2-alpine AS build-image
EXPOSE 3333
EXPOSE 8332

RUN apk add --no-cache \
build-base \
git \
python-dev

COPY . ./
RUN python distribute_setup.py && \
python setup.py develop
COPY --from=compile-image /opt/venv /opt/venv
COPY --from=compile-image /app/stratum-mining-proxy /app/stratum-mining-proxy
WORKDIR /app/stratum-mining-proxy

# Make sure we use the virtualenv:
ENV PATH="/opt/venv/bin:$PATH"
ENTRYPOINT ["./mining_proxy.py"]
Loading