Technical questionAccepted answer
How to bring up a docker-compose container as privileged?
Camilo
Sep 4
0 views1
I was running my container with the command sudo docker run --privileged container_name. But now I'm using a YML and and the command docker-compose up to bring it up but I don't know how to add the --privileged flag when bringing up the container with that command. I already tried adding privileged: true to the YML but it doesn't work in that case.
1 answer
Accepted answer · original discussion
Camilo
PermalinkSep 4
I solved it myself by doing the following:
in the docker-compose.yml file I have these two lines for specifying the image and container's name
version: "3"
services:
app:
image: my_image
container_name: my-container
so to run it with the --privileged flag I used the command: sudo docker run --privileged my-container
0 question comments
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.