the-bastion/docker/Dockerfile.centos8

29 lines
1.2 KiB
Docker
Raw Normal View History

2020-10-16 00:32:37 +08:00
FROM centos:8
LABEL maintainer="stephane.lesimple+bastion@ovhcloud.com"
# cache builds efficiently: just copy the scripts to install packages first
COPY bin/admin/install-ttyrec.sh bin/admin/install-yubico-piv-checker.sh bin/admin/packages-check.sh /opt/bastion/bin/admin/
COPY lib/shell /opt/bastion/lib/shell/
2020-10-16 00:32:37 +08:00
RUN ["/opt/bastion/bin/admin/packages-check.sh","-i","-d","-s"]
RUN ["/opt/bastion/bin/admin/install-ttyrec.sh","-r"]
RUN ["/opt/bastion/bin/admin/install-yubico-piv-checker.sh","-r"]
2020-10-16 00:32:37 +08:00
2020-11-06 01:36:17 +08:00
# disable /dev/kmsg handling by syslog-ng and explicitly enable /dev/log
2020-10-16 00:32:37 +08:00
RUN test -e /etc/syslog-ng/syslog-ng.conf && \
sed -i -re 's=system\(\);=unix-stream("/dev/log");=' /etc/syslog-ng/syslog-ng.conf
# at each modification of our code, we'll start from here thanks to build cache
COPY . /opt/bastion
# tests that the environment works
RUN ["/opt/bastion/bin/dev/perl-check.sh"]
# setup ssh/sshd config and setup bastion install
RUN ["/opt/bastion/bin/admin/install","--new-install"]
2020-10-16 00:32:37 +08:00
# start at entrypoint
ENTRYPOINT /opt/bastion/docker/entrypoint.sh
# TESTOPT --has-mfa=1 --has-pamtester=1 --has-piv=1
# TESTFROM centos:8.3.2011 centos:8.2.2004 centos:8.1.1911