From dcbd3dad78ee046c3d5a595750db12db21fe5591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Fri, 22 Sep 2023 11:30:18 +0200 Subject: [PATCH] Fix error while building the pyodide-electionguard docker image (#305) * Fix error while building the pyodide-electionguard docker image * Extract the build and push Makefile targets for electionguard docker images --- .../docker/pyodide-electionguard/Dockerfile | 3 +++ voting_schemes/electionguard/makefile.mk | 19 ++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/voting_schemes/electionguard/docker/pyodide-electionguard/Dockerfile b/voting_schemes/electionguard/docker/pyodide-electionguard/Dockerfile index cf205393..a7e3a038 100644 --- a/voting_schemes/electionguard/docker/pyodide-electionguard/Dockerfile +++ b/voting_schemes/electionguard/docker/pyodide-electionguard/Dockerfile @@ -3,6 +3,9 @@ LABEL author="hola@decidim.org" ENV PYODIDE_PACKAGES "pyasn1,libgmp,gmpy2,micropip,attrs,sortedcontainers,hypothesis,jsons,typish,rsa" +# Install system dependencies +RUN apt-get update --allow-releaseinfo-change && apt-get install -y libgnutls28-dev + # Add base packages meta files ADD packages /packages diff --git a/voting_schemes/electionguard/makefile.mk b/voting_schemes/electionguard/makefile.mk index 14e98d5d..d1984dba 100644 --- a/voting_schemes/electionguard/makefile.mk +++ b/voting_schemes/electionguard/makefile.mk @@ -39,14 +39,23 @@ DOCKER_PYODIDE_IMAGE = decidim/pyodide-electionguard:pyodide-0.16.1-electionguar electionguard_submodules: git submodule init && git submodule update -electionguard_docker_base: - docker image build --build-arg ELECTIONGUARD_PYTHON_REF=${ELECTIONGUARD_PYTHON_VERSION} -t ${DOCKER_BASE_IMAGE} ${ELECTIONGUARD_DOCKER_PATH}/ruby-node-python-electionguard && \ +electionguard_docker_base: build_electionguard_docker_base \ + push_electionguard_docker_base + +build_electionguard_docker_base: + docker image build --build-arg ELECTIONGUARD_PYTHON_REF=${ELECTIONGUARD_PYTHON_VERSION} -t ${DOCKER_BASE_IMAGE} ${ELECTIONGUARD_DOCKER_PATH}/ruby-node-python-electionguard + +push_electionguard_docker_base: docker image push ${DOCKER_BASE_IMAGE} -electionguard_docker_pyodide: - docker image build -t ${DOCKER_PYODIDE_IMAGE} ${ELECTIONGUARD_DOCKER_PATH}/pyodide-electionguard && \ - docker image push ${DOCKER_PYODIDE_IMAGE} +electionguard_docker_pyodide: build_electionguard_docker_pyodide \ + push_electionguard_docker_pyodide +build_electionguard_docker_pyodide: + docker image build -t ${DOCKER_PYODIDE_IMAGE} ${ELECTIONGUARD_DOCKER_PATH}/pyodide-electionguard + +push_electionguard_docker_pyodide: + docker image push ${DOCKER_PYODIDE_IMAGE} # COMMON TASKS