Skip to content

Commit

Permalink
Build docker
Browse files Browse the repository at this point in the history
  • Loading branch information
enolfc committed Dec 15, 2023
1 parent bd7a322 commit d7dcc54
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions atrope/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3008
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential gcc git \
build-essential gcc git curl gnupg2 \
&& curl -s https://dist.eugridpma.info/distribution/igtf/current/GPG-KEY-EUGridPMA-RPM-3 \
| apt-key add - \
&& echo "deb https://repository.egi.eu/sw/production/cas/1/current egi-igtf core" > /etc/apt/sources.list.d/igtf.list \
&& apt-get update \
&& apt-get install -y ca-policy-egi-core \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /atrope

RUN python -m venv /atrope/venv
ENV PATH="/atrope/venv/bin:$PATH"

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

RUN pip install --no-cache-dir -r requirements.txt \
&& cat /etc/grid-security/certificates/*.pem >> "$(python -m requests.certs)"

COPY . .

Expand All @@ -29,24 +37,18 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3015, DL3008
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl gnupg2 qemu-utils \
&& curl -s \
https://dist.eugridpma.info/distribution/igtf/current/GPG-KEY-EUGridPMA-RPM-3 \
| apt-key add - \
&& echo "deb https://repository.egi.eu/sw/production/cas/1/current egi-igtf core" > /etc/apt/sources.list.d/igtf.list \
&& apt-get update \
&& apt-get install -y ca-policy-egi-core \
&& rm -rf /var/lib/apt/lists/* \
&& cat /etc/grid-security/certificates/*.pem >> "$(python -m requests.certs)"
gnupg2 qemu-utils \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /atrope

RUN groupadd -g 1999 python && \
useradd -r -u 1999 -g python python
RUN groupadd -g 1999 python \
&& useradd -r -u 1999 -g python python

COPY --chown=python:python --from=build /atrope/venv ./venv

USER 1999


ENV PATH="/atrope/venv/bin:$PATH"
CMD ["sites-sync"]

0 comments on commit d7dcc54

Please sign in to comment.