Skip to content

Commit

Permalink
Remove the VOLUME instruction. (#17)
Browse files Browse the repository at this point in the history
This instruction introduces two issues:

1. Each volume becomes an anonymous volume when the container is run.
   These volumes are not automatically removed unless the `--rm` option is used.
   Instead, create temporary volumes with the `--tmpfs` or `--mount` option, as needed.
2. Specifying a `/sys/fs/cgroup` volume interferes with systemd support.
   The anonymous volume overrides the cgroup mount under both docker and podman.
  • Loading branch information
mattclay authored Aug 19, 2022
1 parent e3e3a11 commit 20b4ad2
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
FROM quay.io/bedrock/ubuntu:focal-20220801

VOLUME /sys/fs/cgroup /run/lock /run /tmp

RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
Expand Down

0 comments on commit 20b4ad2

Please sign in to comment.