-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
74 lines (65 loc) · 2.4 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
FROM centos:7
# @see http://label-schema.org/rc1/
LABEL maintainer="Phase2 <outrigger@phase2technology.com>" \
# Replacement for the old MAINTAINER directive has fragmented.
# "vendor" prevents CentOS from leaking through, the other is for tools integrations.
vendor="Phase2 <outrigger@phase2technology.com>" \
org.label-schema.vendor="Phase2 <outrigger@phase2technology.com>" \
# CentOS adds a name label but it is misleading in our instance.
name="Outrigger Keel" \
org.label-schema.name="Outrigger Keel" \
org.label-schema.description="A CentOS-based CLI Developer Base Image for building cross-functional containers. Not for production services." \
org.label-schema.url="http://docs.outrigger.sh" \
org.label-schema.vcs-url="https://github.com/phase2/docker-keel" \
org.label-schema.docker.cmd="docker run -it --rm outrigger/keel bash" \
org.label-schema.docker.cmd.help="docker run -it --rm outrigger/keel" \
org.label-schema.docker.debug="docker exec -it $CONTAINER bash" \
org.label-schema.schema-version="1.0"
# Install base packages.
RUN yum -y install epel-release yum-plugin-ovl deltarpm && \
# Add the IUS repository. This is needed for git2.
curl -L "https://centos7.iuscommunity.org/ius-release.rpm" > /usr/local/ius-release.rpm && \
rpm -Uvh /usr/local/ius-release.rpm && \
yum -y update && \
yum -y install \
bind-utils \
bzip2 \
curl \
dnsutils \
git2u-all \
jq \
less \
make \
openssl \
patch \
pv \
rsync \
sudo \
ssh \
sendmail \
telnet \
unzip \
vim-minimal \
# Necessary for drush and developer orientation.
which && \
yum clean all
# Download & Install confd.
ENV CONFD_VERSION 0.11.0
RUN curl -L "https://github.com/kelseyhightower/confd/releases/download/v$CONFD_VERSION/confd-$CONFD_VERSION-linux-amd64" > /usr/bin/confd && \
chmod +x /usr/bin/confd
ENV CONFD_OPTS '--backend=env --onetime'
# Ensure $HOME is set
ENV HOME /root
# Configure Git
# https://git-scm.com/docs/git-config#git-config-corepreloadIndex
RUN git config --global core.preloadindex true
# Run the init script.
# This script can be customized for extending Docker images by:
# 1. Copy the script to your image repo.
# 2. Modify the script as needed.
# 3. In your Dockerfile, copy the script to the filesystem root.
ENTRYPOINT ["/init"]
# Set up a standard volume for logs.
VOLUME ["/var/log/services"]
COPY root /
CMD [ "/usage.sh" ]