Skip to content

Commit

Permalink
Add an entrypoint to the Agent 'all' containers
Browse files Browse the repository at this point in the history
  • Loading branch information
webbnh committed Mar 11, 2023
1 parent 110444d commit 63ee73e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions agent/containers/images/Dockerfile.layered.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# {{ distro }} pbench-agent {{ kind }} image
FROM pbench-agent-base-{{ distro }}:{{ tag }}

{% kind == 'all' %}
ENTRYPOINT ["/opt/pbench-agent/util-scripts/container_entrypoint"]
{% endif %}

{% if kind in ('tools', 'all') %}
{% if distro.startswith('fedora') or distro == 'centos-7' or distro == 'centos-8' %}
COPY ./{{ distro }}-pcp.repo /etc/yum.repos.d/pcp.repo
Expand Down
11 changes: 11 additions & 0 deletions agent/util-scripts/container_entrypoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# This script is the entrypoint for the Agent containers.
#
# Since execution in these environments does not follow the normal login path,
# we first execute the `agent/profile` script to set up the environment for
# Agent commands. Then we exec the requested command.

source /opt/pbench-agent/profile

exec "${@}"

0 comments on commit 63ee73e

Please sign in to comment.