Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #47: Document cgroups args changes #50

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 34 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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

Expand All @@ -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
5 changes: 3 additions & 2 deletions latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down