Notes on how to get systemd running to install chromium
This commit is contained in:
@@ -36,3 +36,16 @@
|
|||||||
pip:
|
pip:
|
||||||
name: selenium
|
name: selenium
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
# Start the container in privileged mode with:
|
||||||
|
# docker run --privileged --cgroupns=host -d -v /sys/fs/cgroup:/sys/fs/cgroup:rw dev /lib/systemd/systemd
|
||||||
|
# systemctl start snapd
|
||||||
|
# systemctl start udev
|
||||||
|
# snap install chromium
|
||||||
|
# You can use ansible.community.docker to run the container, then do all the above stuff
|
||||||
|
# docker_container_exec might be useful
|
||||||
|
#
|
||||||
|
# Translate the docker run command into the docker_container ansible module with these args:
|
||||||
|
# -v | volumes:
|
||||||
|
# --cgroupns | cgroupns_mode:
|
||||||
|
# -d | detach: true
|
||||||
@@ -8,5 +8,8 @@ RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/s
|
|||||||
RUN sed -i 's/#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' /etc/ssh/sshd_config
|
RUN sed -i 's/#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' /etc/ssh/sshd_config
|
||||||
ADD authorized_keys /root/.ssh/authorized_keys
|
ADD authorized_keys /root/.ssh/authorized_keys
|
||||||
RUN chmod 600 /root/.ssh/authorized_keys
|
RUN chmod 600 /root/.ssh/authorized_keys
|
||||||
|
# Ansible
|
||||||
EXPOSE 22
|
EXPOSE 22
|
||||||
|
# Chromedriver
|
||||||
|
EXPOSE 9515
|
||||||
CMD ["/usr/sbin/sshd", "-D"]
|
CMD ["/usr/sbin/sshd", "-D"]
|
||||||
|
|||||||
+4
-1
@@ -1,3 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Run the docker container
|
# Run the docker container
|
||||||
docker run -p 2222:22 -d dev
|
# This will get systemd up enough to run snapd
|
||||||
|
# See: https://docs.docker.com/desktop/release-notes/#bug-fixes-and-minor-changes
|
||||||
|
# docker run --privileged --cgroupns=host -d -v /sys/fs/cgroup:/sys/fs/cgroup:rw dev /lib/systemd/systemd
|
||||||
|
docker run -p 2222:22 -p 9515:9515 -d dev
|
||||||
|
|||||||
Reference in New Issue
Block a user