Commit 806022f3 authored by ale's avatar ale
Browse files

Initial commit

parents
Pipeline #925 passed with stages
in 1 minute and 4 seconds
image: docker:latest
stages:
- build
- release
services:
- docker:dind
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
RELEASE_TAG: $CI_REGISTRY_IMAGE:latest
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.git.autistici.org
build:
stage: build
script:
- docker build --pull -t $IMAGE_TAG .
- docker push $IMAGE_TAG
release:
stage: release
script:
- docker pull $IMAGE_TAG
- docker tag $IMAGE_TAG $RELEASE_TAG
- docker push $RELEASE_TAG
only:
- master
FROM bitnami/minideb:stretch
COPY build.sh /tmp/build.sh
RUN /tmp/build.sh && rm /tmp/build.sh
Docker base image with [Chaperone](https://github.com/garywiz/chaperone),
a minimal init daemon for container images.
Users of this base image should provide their own chaperone configuration
files and install them in */etc/chaperone.d*, as well as setting the
Docker ENTRY\_POINT to */usr/local/bin/chaperone*.
#!/bin/sh
#
# Install script for chaperone inside a Docker container.
#
# Packages that are only used to build the container. These will be
# removed once we're done.
BUILD_PACKAGES="python3-dev"
# Packages required to serve the website and run the services.
# We have to keep the python3 packages around in order to run
# chaperone (installed via pip).
PACKAGES="python3-pip python3-setuptools python3-wheel"
# The default bitnami/minideb image defines an 'install_packages'
# command which is just a convenient helper. Define our own in
# case we are using some other Debian image.
if [ "x$(which install_packages)" = "x" ]; then
install_packages() {
env DEBIAN_FRONTEND=noninteractive apt-get install -qy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --no-install-recommends "$@"
}
fi
set -x
set -e
install_packages ${BUILD_PACKAGES} ${PACKAGES}
# Install Chaperone (minimalistic init service).
pip3 install chaperone
rm -fr /root/.cache/pip
mkdir -p /etc/chaperone.d
# Users of this base image should provide their own Chaperone config.
#cp /tmp/conf/chaperone.conf /etc/chaperone.d/chaperone.conf
# Remove packages used for installation.
apt-get remove -y --purge ${BUILD_PACKAGES}
apt-get autoremove -y
apt-get clean
rm -fr /var/lib/apt/lists/*
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment