Skip to content

Commit

Permalink
Pass secrets from the host down to internal podman containers
Browse files Browse the repository at this point in the history
This change will allow RHEL subscriptions from the host to flow
to internal containers.

Fixes: containers/common#1735

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
  • Loading branch information
rhatdan committed Nov 11, 2023
1 parent bc7c01d commit f55d29b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contrib/podmanimage/stable/Containerfile
Expand Up @@ -41,6 +41,9 @@ RUN sed -e 's|^#mount_program|mount_program|g' \
/usr/share/containers/storage.conf \
> /etc/containers/storage.conf

# Setup internal Podman to pass subscriptions down from host to internal container
RUN printf '/run/secrets:/run/secrets\n' > /etc/containers/mounts.conf

# Note VOLUME options must always happen after the chown call above
# RUN commands can not modify existing volumes
VOLUME /var/lib/containers
Expand Down
3 changes: 3 additions & 0 deletions contrib/podmanimage/testing/Containerfile
Expand Up @@ -40,6 +40,9 @@ RUN sed -e 's|^#mount_program|mount_program|g' \
/usr/share/containers/storage.conf \
> /etc/containers/storage.conf

# Setup internal Podman to pass secrets/subscriptions down from host to internal container
RUN printf '/run/secrets:/run/secrets\n' > /etc/containers/mounts.conf

# Note VOLUME options must always happen after the chown call above
# RUN commands can not modify existing volumes
VOLUME /var/lib/containers
Expand Down
3 changes: 3 additions & 0 deletions contrib/podmanimage/upstream/Containerfile
Expand Up @@ -47,6 +47,9 @@ RUN sed -e 's|^#mount_program|mount_program|g' \
/usr/share/containers/storage.conf \
> /etc/containers/storage.conf

# Setup internal Podman to pass secrets/subscriptions down from host to internal container
RUN printf '/run/secrets:/run/secrets\n' > /etc/containers/mounts.conf

# Note VOLUME options must always happen after the chown call above
# RUN commands can not modify existing volumes
VOLUME /var/lib/containers
Expand Down

0 comments on commit f55d29b

Please sign in to comment.