Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ai3
docker
chaperone-base
Commits
806022f3
Commit
806022f3
authored
Mar 14, 2018
by
ale
Browse files
Initial commit
parents
Pipeline
#925
passed with stages
in 1 minute and 4 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
806022f3
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
Dockerfile
0 → 100644
View file @
806022f3
FROM
bitnami/minideb:stretch
COPY
build.sh /tmp/build.sh
RUN
/tmp/build.sh
&&
rm
/tmp/build.sh
README.md
0 → 100644
View file @
806022f3
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*
.
build.sh
0 → 100755
View file @
806022f3
#!/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/
*
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment