Fixing issues with docker 17.07 ce and systemd

pull/117/head
Carlos Hernandez 7 years ago
parent 582fd31aaf
commit 4a4b024861

@ -53,7 +53,7 @@ RUN yum clean all \
&& ln -s /lib/systemd/system/systemd-journald.service /etc/systemd/system/multi-user.target.wants/systemd-journald.service \
&& echo $'[Unit]\
\nDescription=Finish boot up\
\nAfter=ssh.service\
\nAfter=sshd.service\
\n\
\n[Service]\
\nType=oneshot\

@ -45,7 +45,7 @@ RUN apt-get update \
&& sed -ri 's/^#?UsePrivilegeSeparation\s+.*/UsePrivilegeSeparation no/' /etc/ssh/sshd_config \
&& echo "UseDNS=no" >> /etc/ssh/sshd_config \
&& systemctl set-default multi-user.target \
&& ln -s /lib/systemd/system/sshd.service /etc/systemd/system/multi-user.target.wants/sshd.service \
&& ln -s /lib/systemd/system/ssh.service /etc/systemd/system/multi-user.target.wants/ssh.service \
&& ln -s /lib/systemd/system/systemd-journald.service /etc/systemd/system/multi-user.target.wants/systemd-journald.service \
&& echo $'[Unit]\
\nDescription=Finish boot up\

@ -51,7 +51,7 @@ RUN dnf clean all \
&& ln -s /lib/systemd/system/systemd-journald.service /etc/systemd/system/multi-user.target.wants/systemd-journald.service \
&& echo $'[Unit]\
\nDescription=Finish boot up\
\nAfter=ssh.service\
\nAfter=sshd.service\
\n\
\n[Service]\
\nType=oneshot\

@ -45,7 +45,7 @@ RUN apt-get update \
&& sed -ri 's/^#?UsePrivilegeSeparation\s+.*/UsePrivilegeSeparation no/' /etc/ssh/sshd_config \
&& echo "UseDNS=no" >> /etc/ssh/sshd_config \
&& systemctl set-default multi-user.target \
&& ln -s /lib/systemd/system/sshd.service /etc/systemd/system/multi-user.target.wants/sshd.service \
&& ln -s /lib/systemd/system/ssh.service /etc/systemd/system/multi-user.target.wants/ssh.service \
&& ln -s /lib/systemd/system/systemd-journald.service /etc/systemd/system/multi-user.target.wants/systemd-journald.service \
&& echo $'[Unit]\
\nDescription=Finish boot up\

@ -46,7 +46,7 @@ RUN apt-get update \
&& sed -ri 's/^#?UsePrivilegeSeparation\s+.*/UsePrivilegeSeparation no/' /etc/ssh/sshd_config \
&& echo "UseDNS=no" >> /etc/ssh/sshd_config \
&& systemctl set-default multi-user.target \
&& ln -s /lib/systemd/system/sshd.service /etc/systemd/system/multi-user.target.wants/sshd.service \
&& ln -s /lib/systemd/system/ssh.service /etc/systemd/system/multi-user.target.wants/ssh.service \
&& ln -s /lib/systemd/system/systemd-journald.service /etc/systemd/system/multi-user.target.wants/systemd-journald.service \
&& echo $'[Unit]\
\nDescription=Finish boot up\

@ -25,26 +25,10 @@ transport:
max_ssh_sessions: 3
platforms:
- name: alpine-latest
provisioner:
require_ansible_omnibus: false
driver_config:
run_command: /sbin/tini -v -- /usr/sbin/sshd -D -E /var/log/secure
dockerfile: .Dockerfiles/alpine/latest/Dockerfile
platform: alpine
cap_add:
- SYS_ADMIN
volume:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- <%=ENV['PWD']%>:/opt/workspace # Make the working directory available inside the container
run_options:
tmpfs:
- /run
- name: debian-stable
- name: debian-latest
driver_config:
run_command: /lib/systemd/systemd
dockerfile: .Dockerfiles/debian/stable/Dockerfile
dockerfile: .Dockerfiles/debian/latest/Dockerfile
platform: debian
cap_add:
- SYS_ADMIN
@ -53,7 +37,8 @@ platforms:
- <%=ENV['PWD']%>:/opt/workspace # Make the working directory available inside the container
run_options:
tmpfs:
- /run
- /run
- /run/lock
- name: fedora-latest
driver_config:
@ -67,7 +52,8 @@ platforms:
- <%=ENV['PWD']%>:/opt/workspace # Make the working directory available inside the container
run_options:
tmpfs:
- /run
- /run
- /run/lock
- name: centos-latest
driver_config:
@ -81,7 +67,8 @@ platforms:
- <%=ENV['PWD']%>:/opt/workspace # Make the working directory available inside the container
run_options:
tmpfs:
- /run
- /run
- /run/lock
- name: ubuntu-latest
driver_config:
@ -95,7 +82,8 @@ platforms:
- <%=ENV['PWD']%>:/opt/workspace # Make the working directory available inside the container
run_options:
tmpfs:
- /run
- /run
- /run/lock
- name: ubuntu-rolling
driver_config:
@ -109,7 +97,8 @@ platforms:
- <%=ENV['PWD']%>:/opt/workspace # Make the working directory available inside the container
run_options:
tmpfs:
- /run
- /run
- /run/lock
- name: alpine-latest
driver_config:
@ -121,7 +110,8 @@ platforms:
- <%=ENV['PWD']%>:/opt/workspace # Make the working directory available inside the container
run_options:
tmpfs:
- /run
- /run
- /run/lock
verifier:
name: serverspec

Loading…
Cancel
Save