Score:0

Can I relable a docker volume when I create the container?

at flag

I'm following a tutorial that wants me to use podman like this:

podman run --mount=type=bind,src=$(pwd)/data,dst=/prometheus/data,relabel=shared --publish=127.0.0.1:9090:9090 --detach prometheus:latest

But I don't want to use podman. I'm not allowed to install podman. I want to use docker but I can't see how to accomplish the relabel operation. There seems to be no analog in docker. Is there?

Score:1
co flag

That looks like:

-v "$(pwd)/data:/prometheus/data:z"

Documentation on configuring the selinux labels can be found at: https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.