Dockerfile with CI

This commit is contained in:
Thomas Couchoud
2021-11-18 13:04:22 +01:00
parent b8f6fd09f0
commit 9ccf2f60ea
4 changed files with 107 additions and 0 deletions

29
Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
FROM python:3-slim-buster
ARG BUILDX_QEMU_ENV
WORKDIR /usr/src/app
COPY ./miner/requirements.txt ./
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --fix-missing --no-install-recommends \
gcc \
libffi-dev \
rustc \
zlib1g-dev \
libjpeg-dev \
libssl-dev \
&& if [ "${BUILDX_QEMU_ENV}" = "true" ] && [ "$(getconf LONG_BIT)" = "32" ]; then \
pip install -U cryptography==3.3.2; \
fi \
&& pip install -r requirements.txt \
&& pip cache purge \
&& apt-get remove -y gcc rustc \
&& apt-get autoremove -y \
&& apt-get autoclean -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /usr/share/doc/*
COPY ./miner .
CMD [ "python", "./main.py" ]