forked from Bikeemotion/CentOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.tmpl
43 lines (37 loc) · 1.59 KB
/
Dockerfile.tmpl
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
FROM centos${FROM_DOCKERFILE_TAG}
MAINTAINER bikeemotion <backend@bikeemotion.com>
# https://bugzilla.redhat.com/show_bug.cgi?id=736694
# http://serverfault.com/questions/694942/yum-should-error-when-a-package-is-not-available
RUN rpmkeys --import file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 && \
PKGS_TO_INSTALL="\
bind-utils-9.9.4-* \
centos-release-scl-rh-2-* \
epel-release-7-* \
gettext-0.19.8.1-* \
iproute-4.11.0-* \
libcgroup-tools-0.41-* \
sudo-1.8.23-* \
which-2.20-*" && \
echo "Validating the existence of the following packages:" && \
for PKG in ${PKGS_TO_INSTALL}; do \
(echo "${PKG}" && yum info ${PKG} >> /dev/null 2>&1) || exit 1; \
done && \
yum -y --setopt=tsflags=nodocs install ${PKGS_TO_INSTALL} && \
rm -fr /var/cache/yum/* && \
yum clean all
COPY root_fs/ /
# despite 'en_US.UTF-8' being the default one in centos upstream image, its does not work for other users that root
ENV LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8 \
TERM=xterm
# Get prefix path and path to scripts rather than hard-code them in scripts
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container_scripts
# When bash is started non-interactively, to run a shell script, for example it
# looks for this variable and source the content of this file. This will enable
# the SCL for all scripts without need to do 'scl enable'.
ENV BASH_ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \
ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \
PROMPT_COMMAND=". ${CONTAINER_SCRIPTS_PATH}/scl_enable"
ENTRYPOINT ["container_entrypoint"]
#CMD ["infinite_loop"]
CMD ["bash"]