-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1137 from moensch/add-centos-docker
Building a CentOS 7.x Docker image
- Loading branch information
Showing
9 changed files
with
124 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM centos:7.7.1908 | ||
|
||
RUN yum -y install \ | ||
curl \ | ||
ca-certificates \ | ||
bash \ | ||
git \ | ||
perl \ | ||
rsync \ | ||
openssh-clients \ | ||
curl \ | ||
crontabs \ | ||
epel-release \ | ||
&& yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo \ | ||
&& yum -y install docker-ce jq \ | ||
&& yum clean all \ | ||
&& rm -rf /var/cache/yum* | ||
|
||
RUN curl -Lfs -o /sbin/tini https://github.com/krallin/tini/releases/download/v0.18.0/tini \ | ||
&& chmod +x /sbin/tini \ | ||
&& curl -Lfs https://github.com/docker/compose/releases/download/1.24.0/docker-compose-Linux-x86_64 -o /usr/local/bin/docker-compose \ | ||
&& chmod +x /usr/local/bin/docker-compose | ||
|
||
ENV BUILDKITE_AGENT_CONFIG=/buildkite/buildkite-agent.cfg \ | ||
PATH="/usr/local/bin:${PATH}" | ||
|
||
RUN mkdir -p /buildkite/builds /buildkite/hooks /buildkite/plugins \ | ||
&& curl -Lfs -o /usr/local/bin/ssh-env-config.sh https://raw.githubusercontent.com/buildkite/docker-ssh-env-config/master/ssh-env-config.sh \ | ||
&& chmod +x /usr/local/bin/ssh-env-config.sh | ||
|
||
COPY ./buildkite-agent.cfg /buildkite/buildkite-agent.cfg | ||
COPY ./buildkite-agent /usr/local/bin/buildkite-agent | ||
COPY ./entrypoint.sh /usr/local/bin/buildkite-agent-entrypoint | ||
|
||
VOLUME /buildkite | ||
ENTRYPOINT ["buildkite-agent-entrypoint"] | ||
CMD ["start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# The token from your Buildkite "Agents" page | ||
#token="xxx" | ||
|
||
# The name of the agent | ||
name="%hostname-%n" | ||
|
||
# The priority of the agent (higher priorities are assigned work first) | ||
# priority=1 | ||
|
||
# Tags for the agent (default is "queue=default") | ||
# tags="key1=val2,key2=val2" | ||
|
||
# Include the host's EC2 meta-data as tags (instance-id, instance-type, and ami-id) | ||
# tags-from-ec2=true | ||
|
||
# Include the host's EC2 tags as tags | ||
# tags-from-ec2-tags=true | ||
|
||
# Include the host's Google Cloud instance meta-data as tags (instance-id, machine-type, preemptible, project-id, region, and zone) | ||
# tags-from-gcp=true | ||
|
||
# Include the host's Google Cloud instance labels as tags | ||
# tags-from-gcp-labels=true | ||
|
||
# Path to a custom bootstrap command to run. By default this is `buildkite-agent bootstrap`. | ||
# This allows you to override the entire execution of a job. Generally you should use hooks instead! | ||
# See https://buildkite.com/docs/agent/hooks | ||
# bootstrap-script="" | ||
|
||
# Path to where the builds will run from | ||
build-path="/buildkite/builds" | ||
|
||
# Directory where the hook scripts are found | ||
hooks-path="/buildkite/hooks" | ||
|
||
# Directory where plugins will be installed | ||
plugins-path="/buildkite/plugins" | ||
|
||
# Flags to pass to the `git clone` command | ||
# git-clone-flags=-v | ||
|
||
# Flags to pass to the `git clean` command | ||
# git-clean-flags=-ffxdq | ||
|
||
# Do not run jobs within a pseudo terminal | ||
# no-pty=true | ||
|
||
# Don't automatically verify SSH fingerprints | ||
# no-automatic-ssh-fingerprint-verification=true | ||
|
||
# Don't allow this agent to run arbitrary console commands | ||
# no-command-eval=true | ||
|
||
# Don't allow this agent to run plugins | ||
# no-plugins=true | ||
|
||
# Enable debug mode | ||
# debug=true | ||
|
||
# Don't show colors in logging | ||
# no-color=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
DIR=/docker-entrypoint.d | ||
|
||
if [[ -d "$DIR" ]] ; then | ||
echo "Executing scripts in $DIR" | ||
/bin/run-parts --exit-on-error "$DIR" | ||
fi | ||
|
||
exec /sbin/tini -g -- ssh-env-config.sh /usr/local/bin/buildkite-agent "$@" |