How to bring up a docker-compose container as privileged?
There is an apposite parameter to use: web: image: an_image-image:1.0 container_name: my-container privileged: true entrypoint: [“/usr/sbin/init”] ports: – “8280:8280”
There is an apposite parameter to use: web: image: an_image-image:1.0 container_name: my-container privileged: true entrypoint: [“/usr/sbin/init”] ports: – “8280:8280”
UPDATE: Things have changed in the last years. Please refer to the answer from @Frederik Wendt for a good and up-to-date solution. My old answer: Exactly how to do it depends a little on what image you are using for your data-only-container. If your image has an entrypoint, you need to overwrite this in your … Read more
In my case I had an erroneous reference in Dependencies > Packages to Microsoft.VisualStudio.Azure.Containers.Tools.Targets Removing the reference fixed the error.
I was wondering the same thing and found this: https://github.com/docker/compose/issues/4513 So in short it’s just not possible to do that, you have to use the version 2.1 of the docker-compose format to be able to specify limits that are not ignored by docker-compose up
As soon as you’ve setup the certificate in nginx, I see no sense enabling it in the asp.net core container as your docker network is going to be visible to public via nginx. To disable Kestrel Https listening just remove 443 port from the following code: – ASPNETCORE_URLS=https://+:443;http://+:80 Replace it with: – ASPNETCORE_URLS=http://+:80 With .NET … Read more
You may have to switch to version: 3 to do this, I believe on version: 2 you can use the “scale” parameter but I’m not 100% sure. Anyways, you can override the “replicas” parameter like this: # docker-compose.prod.yml version: “3” services: db_for_development: deploy: replicas: 0
As documented on the docker hub page for that image (https://hub.docker.com/_/mongo/) you can use volumes: – ‘./data:/data/db’ Which will use the host path ./data
Unfortunately Marks answer doesn’t work for me. However this command did: docker system prune –all –force
There is possibly mistake in the syntax you are using. The ports are defined in the next line and after leaving some space. It should work and as specified in the reference. See example below: ports: – “3000” – “3000-3005” – “8000:8000” – “9090-9091:8080-8081” – “49100:22” – “127.0.0.1:8001:8001” – “127.0.0.1:5000-5010:5000-5010” – “6060:6060/udp”
First lets clarify the basic terms here. Citing from the official docs: An image is a read-only template with instructions for creating a Docker container. Basically an image is just a filesystem archive containing the files and directory structure and some additional metadata (like ENV or CMD) for a container. So you may also think … Read more