mirror of
https://github.com/ovh/the-bastion.git
synced 2024-12-27 01:56:24 +08:00
34 lines
1.3 KiB
Text
34 lines
1.3 KiB
Text
FROM opensuse/leap:15
|
|
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/install-mkhash-helper.sh \
|
|
bin/admin/packages-check.sh \
|
|
/opt/bastion/bin/admin/
|
|
COPY lib/shell /opt/bastion/lib/shell/
|
|
RUN ["/opt/bastion/bin/admin/packages-check.sh","-i","-d","-s"]
|
|
RUN ["/usr/bin/chmod","u+s","/usr/bin/ping","/usr/sbin/fping"]
|
|
RUN ["/opt/bastion/bin/admin/install-ttyrec.sh","-r"]
|
|
RUN ["/opt/bastion/bin/admin/install-yubico-piv-checker.sh","-r"]
|
|
RUN ["/opt/bastion/bin/admin/install-mkhash-helper.sh","-r"]
|
|
|
|
# disable /dev/kmsg handling by syslog-ng and explicitly enable /dev/log
|
|
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"]
|
|
|
|
# start at entrypoint
|
|
ENTRYPOINT /opt/bastion/docker/entrypoint.sh
|
|
|
|
# TESTOPT --has-mfa=0 --has-pamtester=0 --has-piv=0 --has-sk=1
|
|
# TESTFROM opensuse/leap:15.4 opensuse/leap:15.5
|