Skip to content

Commit

Permalink
fixup! Remove Gramine dependencies that are not needed at runtime
Browse files Browse the repository at this point in the history
Signed-off-by: abin <[email protected]>
  • Loading branch information
amathew3 committed Apr 21, 2023
1 parent 06eaa88 commit 4ff2def
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions templates/Dockerfile.common.sign.template
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ FROM {{image}}
COPY --from=unsigned_image /gramine/app_files/*.sig /gramine/app_files/
COPY --from=unsigned_image /gramine/app_files/*.sgx /gramine/app_files/

{% if remove_gramine_deps %}
# Temporarily switch to the root user to uninstall packages
USER root

{% block uninstall %}{% endblock %}

# Switch back to original app_image user
USER {{app_user}}
{% endif %}

2 changes: 0 additions & 2 deletions templates/centos/Dockerfile.sign.template
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{% extends "Dockerfile.common.sign.template" %}

{% block uninstall %}
{% if remove_gramine_deps %}
RUN \
dnf update -y \
&& dnf install -y python3-pip \
Expand All @@ -19,7 +18,6 @@ RUN \
python3-cryptography \
tcl \
&& dnf -y clean all;
{% endif %}
{% endblock %}

{% block path %}export PYTHONPATH="${PYTHONPATH}:$(find /gramine/meson_build_output/lib64 -type d -path '*/site-packages')" &&{% endblock %}
2 changes: 0 additions & 2 deletions templates/debian/Dockerfile.sign.template
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{% extends "Dockerfile.common.sign.template" %}

{% block uninstall %}
{% if remove_gramine_deps %}
RUN \
apt update -y \
&& apt install -y python3-pip \
Expand All @@ -18,7 +17,6 @@ RUN \
python3-pyelftools \
&& apt autoremove -y \
&& rm -rf /var/lib/apt/lists/*;
{% endif %}
{% endblock %}

{% block path %}export PYTHONPATH="${PYTHONPATH}:$(find /gramine/meson_build_output/lib -type d -path '*/site-packages')" &&{% endblock %}

0 comments on commit 4ff2def

Please sign in to comment.