Skip to content
Snippets Groups Projects
Commit 7eec7c75 authored by drebs's avatar drebs
Browse files

Initial commit

parents
Branches
Tags
No related merge requests found
Pipeline #86180 passed
stages:
- build
- tag
variables:
CI_REGISTRY_IMAGE: "${CI_REGISTRY}/${CI_PROJECT_ROOT_NAMESPACE}/${CI_PROJECT_NAME}"
before_script:
- docker info
build:
image: docker:20.10.11
stage: build
script:
- docker build -t ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA} .
- docker push ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}
tags:
- docker
tag:
stage: tag
image: docker:20.10.11
script:
- docker tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA} ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}
- docker push ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}
only:
- tags
tags:
- docker
FROM debian:bullseye
HEALTHCHECK --interval=10s --timeout=15s --retries=12 --start-period=3m CMD ["/usr/bin/curl", "-k", "-I", "https://127.0.0.1:8140"]
RUN apt-get update -qq && apt install -y git puppet-master curl
RUN puppet config set autosign "true" --section master
COPY entrypoint.sh /
COPY docker-entrypoint.d /docker-entrypoint.d
ENTRYPOINT /entrypoint.sh
Puppet Server
=============
Inspired by [puppet/puppetserver][1], this image runs a Puppet Server with
modules directory pointing to `${CI_PROJECT_DIR}` and an empty default node
definition.
[1]: https://hub.docker.com/r/puppet/puppetserver
#!/bin/sh
set -ex
CODE_DIR=/etc/puppet/code/environments/production
mkdir -p ${CODE_DIR}
if [ -d "${CI_PROJECT_DIR}" ]; then
rm -rf ${CODE_DIR}/modules
ln -sf ${CI_PROJECT_DIR} ${CODE_DIR}/modules
fi
#!/bin/sh
set -ex
CODE_DIR=/etc/puppet/code/environments/production
mkdir -p ${CODE_DIR}/manifests
echo "node 'default' { }" >> ${CODE_DIR}/manifests/nodes.pp
#!/bin/bash
set -e
chmod +x /docker-entrypoint.d/*.sh
# sync prevents aufs from sometimes returning EBUSY if you exec right after a chmod
sync
for f in /docker-entrypoint.d/*.sh; do
echo "Running $f"
"$f"
done
/bin/bash "$@"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment