diff --git a/README.md b/README.md index b00472b..5f22785 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,16 @@ Ready to use images are published at [Docker Hub](https://hub.docker.com/r/plesk Create a container based on published image for evaluation purposes: - docker run -d --tmpfs /tmp --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 8880:8880 plesk/plesk + docker run -d \ + --tmpfs /tmp \ + --tmpfs /run \ + --tmpfs /run/lock \ + -v /sys/fs/cgroup:/sys/fs/cgroup \ + --cgroupns=host \ + --cap-add SYS_ADMIN \ + --security-opt apparmor=unconfined \ + -p 8880:8880 \ + plesk/plesk Use Docker host IP address and 8880 port for URL to open it in the browser. The following command can be used in the terminal: @@ -18,11 +27,20 @@ Default login and password: `admin` / `changeme1Q**` Create a container with typical port mapping: - docker run -d --tmpfs /tmp --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 80:80 -p 443:443 -p 8880:8880 -p 8443:8443 -p 8447:8447 plesk/plesk - -Automatic port mapping can be used to publish all exposed ports to random ports with high numbers: - - docker run -d --tmpfs /tmp --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro -P plesk/plesk + docker run -d \ + --tmpfs /tmp \ + --tmpfs /run \ + --tmpfs /run/lock \ + -v /sys/fs/cgroup:/sys/fs/cgroup \ + --cgroupns=host \ + --cap-add SYS_ADMIN \ + --security-opt apparmor=unconfined \ + -p 80:80 \ + -p 443:443 \ + -p 8880:8880 \ + -p 8443:8443 \ + -p 8447:8447 \ + plesk/plesk # How To Build And Test @@ -32,4 +50,13 @@ Here is an example on how to build the image manually: Create a container to test the image: - docker run -d --tmpfs /tmp --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 8880:8880 plesk/plesk + docker run -d \ + --tmpfs /tmp \ + --tmpfs /run \ + --tmpfs /run/lock \ + -v /sys/fs/cgroup:/sys/fs/cgroup \ + --cgroupns=host \ + --cap-add SYS_ADMIN \ + --security-opt apparmor=unconfined \ + -p 8880:8880 \ + plesk/plesk diff --git a/latest/Dockerfile b/latest/Dockerfile index bb5eee6..ad261ce 100644 --- a/latest/Dockerfile +++ b/latest/Dockerfile @@ -1,6 +1,7 @@ # Plesk container with real systemd -# Run in background: 'docker run -d --tmpfs /tmp --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 8443:8443 IMAGE' -# Run in foreground: 'docker run -ti --rm --tmpfs /tmp --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 8443:8443 IMAGE', stop with 'halt' instead of Ctrl+D +# To test it, run the container in foreground using the following command: +# docker run -ti --rm --tmpfs /tmp --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup --cgroupns=host --cap-add SYS_ADMIN --security-opt apparmor=unconfined -p 8443:8443 plesk/plesk +# Stop it with 'halt' instead of Ctrl+D. ARG OS=ubuntu:20.04 FROM $OS