Skip to content

Commit

Permalink
Merge pull request #101 from voxpupuli/100-suggestion-install-ssh-cli…
Browse files Browse the repository at this point in the history
…ent-for-r10k

add ssh client and rugged gem
  • Loading branch information
marcusdots authored Aug 2, 2024
2 parents 638c717 + 98f9e17 commit 40c2f35
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
build_args: |
PUPPET_RELEASE=${{ matrix.release }}
PUPPETSERVER_VERSION=${{ matrix.version }}
R10K_VERSION=${{ matrix.r10k_version }}
RUGGED_VERSION=${{ matrix.rugged_version }}
build_arch: linux/amd64,linux/arm64
docker_username: voxpupulibot
docker_password: ${{ secrets.DOCKERHUB_BOT_PASSWORD }}
Expand Down
8 changes: 6 additions & 2 deletions build_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
"include": [
{
"release": 7,
"version": "7.17.1"
"version": "7.17.1",
"r10k_version": "4.1.0",
"rugged_version": "1.7.2"
},
{
"release": 8,
"version": "8.6.1"
"version": "8.6.1",
"r10k_version": "4.1.0",
"rugged_version": "1.7.2"
}
]
}
25 changes: 15 additions & 10 deletions puppetserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ ARG UBUNTU_CODENAME=jammy

FROM ubuntu:22.04 as base

ARG PACKAGES=ca-certificates\ git\ netbase\ openjdk-17-jre-headless\ ruby3.0
ARG PACKAGES="ca-certificates git netbase openjdk-17-jre-headless ruby3.0 openssh-client"
ARG BUILD_PKGS="ruby3.0-dev gcc make cmake pkg-config libssl-dev libc6-dev"
ARG DUMB_INIT_VERSION="1.2.5"
ARG TARGETARCH

Expand Down Expand Up @@ -65,26 +66,31 @@ COPY add_cache_del_api_auth_rules.rb /add_cache_del_api_auth_rules.rb
# k8s uses livenessProbe, startupProbe, readinessProbe and ignores HEALTHCHECK
HEALTHCHECK --interval=20s --timeout=15s --retries=12 --start-period=3m CMD ["/healthcheck.sh"]

ARG R10K_VERSION=4.1.0
ARG RUGGED_VERSION=1.7.2

# no need to pin versions or clear apt cache as its still being used
# hadolint ignore=DL3008,DL3009
RUN chmod +x /docker-entrypoint.sh /healthcheck.sh /docker-entrypoint.d/*.sh && \
apt-get update && \
apt-get install -y --no-install-recommends $PACKAGES && \
apt-get install -y --no-install-recommends $PACKAGES $BUILD_PKGS && \
gem install --no-doc r10k -v $R10K_VERSION && \
gem install --no-doc rugged -v $RUGGED_VERSION && \
dpkg -i dumb-init_"$DUMB_INIT_VERSION"_"$TARGETARCH".deb && \
rm dumb-init_"$DUMB_INIT_VERSION"_"$TARGETARCH".deb
rm dumb-init_"$DUMB_INIT_VERSION"_"$TARGETARCH".deb && \
apt remove -y $BUILD_PKGS && \
apt-get clean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*

######################################################
# release (build from packages)
######################################################

FROM base as release

ARG PUPPET_RELEASE
ENV PUPPET_RELEASE=${PUPPET_RELEASE:-7}

ARG PUPPETSERVER_VERSION
ENV PUPPETSERVER_VERSION=${PUPPETSERVER_VERSION:-7.13.0}

ARG PUPPET_RELEASE=8
ARG PUPPETSERVER_VERSION=8.6.1
ARG UBUNTU_CODENAME

######################################################
Expand All @@ -109,7 +115,6 @@ RUN apt-get update && \
apt-get install --no-install-recommends -y puppetserver=${PUPPETSERVER_VERSION}-1${UBUNTU_CODENAME} puppetdb-termini && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
gem install --no-doc r10k && \
cp -pr /etc/puppetlabs/puppet /var/tmp && \
cp -pr /opt/puppetlabs/server/data/puppetserver /var/tmp && \
rm -rf /var/tmp/puppet/ssl
Expand Down

0 comments on commit 40c2f35

Please sign in to comment.