Skip to content

Commit

Permalink
server,clients,daemons,ui,init: add policy package build arg support; f…
Browse files Browse the repository at this point in the history
…ix #364
  • Loading branch information
rdimaio authored and bari12 committed Feb 14, 2025
1 parent e165dd9 commit 105a57a
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 0 deletions.
14 changes: 14 additions & 0 deletions clients/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,19 @@ ADD --chown=user;user ./entrypoint.sh /opt/user/entrypoint.sh

ENV PATH $PATH:/opt/rucio/bin

Check warning on line 46 in clients/Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push (clients, prepend-rucio, prepend-release, push-tagged, push-latest)

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

ARG POLICY_PACKAGE_REQUIREMENTS
ARG USER=root
USER root
RUN if [ -n "$POLICY_PACKAGE_REQUIREMENTS" ]; then \
dnf install -y git && \
for package in $(echo $POLICY_PACKAGE_REQUIREMENTS | tr "," "\n"); do \
python3 -m pip install --no-cache-dir $package; \
done; \
dnf remove -y git && \
dnf autoremove && \
dnf clean all; \
fi
USER ${USER}

ENTRYPOINT ["/opt/user/entrypoint.sh"]
CMD ["bash"]
14 changes: 14 additions & 0 deletions daemons/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,18 @@ VOLUME /opt/rucio/etc

ENV USE_DAVIX_WITH_OPENSSL31=True

ARG POLICY_PACKAGE_REQUIREMENTS
ARG USER=root
USER root
RUN if [ -n "$POLICY_PACKAGE_REQUIREMENTS" ]; then \
dnf install -y git && \
for package in $(echo $POLICY_PACKAGE_REQUIREMENTS | tr "," "\n"); do \
python3 -m pip install --no-cache-dir $package; \
done; \
dnf remove -y git && \
dnf autoremove && \
dnf clean all; \
fi
USER ${USER}

ENTRYPOINT ["/start-daemon.sh"]
14 changes: 14 additions & 0 deletions init/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,18 @@ COPY alembic.ini.j2 /tmp
COPY bootstrap.py /tmp
COPY docker-entrypoint.sh /

ARG POLICY_PACKAGE_REQUIREMENTS
ARG USER=root
USER root
RUN if [ -n "$POLICY_PACKAGE_REQUIREMENTS" ]; then \
dnf install -y git && \
for package in $(echo $POLICY_PACKAGE_REQUIREMENTS | tr "," "\n"); do \
python3 -m pip install --no-cache-dir $package; \
done; \
dnf remove -y git && \
dnf autoremove && \
dnf clean all; \
fi
USER ${USER}

CMD ["/docker-entrypoint.sh"]
14 changes: 14 additions & 0 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,18 @@ VOLUME /opt/rucio/etc
EXPOSE 80
EXPOSE 443

ARG POLICY_PACKAGE_REQUIREMENTS
ARG USER=root
USER root
RUN if [ -n "$POLICY_PACKAGE_REQUIREMENTS" ]; then \
dnf install -y git && \
for package in $(echo $POLICY_PACKAGE_REQUIREMENTS | tr "," "\n"); do \
python3 -m pip install --no-cache-dir $package; \
done; \
dnf remove -y git && \
dnf autoremove && \
dnf clean all; \
fi
USER ${USER}

ENTRYPOINT ["/docker-entrypoint.sh"]
14 changes: 14 additions & 0 deletions ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,18 @@ VOLUME /opt/rucio/etc
EXPOSE 80
EXPOSE 443

ARG POLICY_PACKAGE_REQUIREMENTS
ARG USER=root
USER root
RUN if [ -n "$POLICY_PACKAGE_REQUIREMENTS" ]; then \
dnf install -y git && \
for package in $(echo $POLICY_PACKAGE_REQUIREMENTS | tr "," "\n"); do \
python3 -m pip install --no-cache-dir $package; \
done; \
dnf remove -y git && \
dnf autoremove && \
dnf clean all; \
fi
USER ${USER}

ENTRYPOINT ["/docker-entrypoint.sh"]

0 comments on commit 105a57a

Please sign in to comment.