Questions tagged [docker-compose]

107 questions
8
votes
0 answers

Docker: "failed to get console mode for stdout: The handle is invalid."

When running docker-compose up in Windows PowerShell using Docker Desktop on WSL2, I get Creating network "test_default" with the default driver Building master failed to get console mode for stdout: The handle is invalid. There is a hint at failed…
questionto42
  • 2,691
5
votes
1 answer

How to setup docker in read_only mode in docker-compose

Many guides shows, it is good to make the container in read_only mode. However, how to do this in docker-compose? Many containers save logs at least, so they need r+w permission. How do you setup containter in read_only mode? None of my solutions…
user1251775
4
votes
1 answer

“volumes 'type' is a required property” error with docker-compose

I have just started to learn how docker works and I have a problem with the yaml file when using docker-compose. version: '3.7' services: portainer: container_name: portainer image: portainer/portainer volumes: -…
4
votes
3 answers

Docker containers cannot connect to internet in Fedora 32?

The Problem I have recently created a docker container that has to pull a public github repository, however, it isn't able to resolve the host github.com. In fact, it isn't able to even execute ping command. NOTE: all network operations here are…
3
votes
1 answer

Why am I not able to see mounted folder with Docker-Desktop with WSL2?

I am facing some weird problem, I suspect, I am missing something but not able to find what is wrong. I spent quite a bit of time but not able to find what the problem is. I have windows 10 with wsl2 enabled. Installed Docker desktop with wsl2 as…
3
votes
1 answer

How to tie Docker container status to CIFS volume status?

In my home lab I have containers spread across a few devices (mainly a server and a NAS). I have Docker containers running on the server whose main storage is on the NAS, and I have named cifs volumes to expose the SMB shares to the containers. So…
keyboardr
  • 131
3
votes
1 answer

How can I have the docker-healthcheck run outside of the container?

I may be a bit confused, but what I want to do is have a healthceck that runs outside the container, for instance on the host. I'm not sure why docker itself can't do the curling to the container, to decide if it is healthy. healthcheck: test:…
nycynik
  • 195
3
votes
1 answer

Create docker container with link to hardware device that doesn't exist yet

My use case: I use a containerized octoprint instance to drive a 3dprinter. The problem I'm running into is that if the printer(usb) isn't connected during the boot process of the container, then it doesn't boot at all. Docker compose can't find the…
BugSquanch
  • 3,053
2
votes
1 answer

Persistent Volumes using Docker Compose (Dokploy, Directus)

I'm relatively new to Docker and trying to learn self-hosting to host some small projects. I use a reasonably new PaaS tool called Dokploy to manage my containers. I have been trying to run Directus (v10.13.1) using docker-compose, and everything…
2
votes
1 answer

Within Docker, how to correctly add a task to cron programmatically (scripting)? no errors are perceived in log

After several days of messing around with Docker, I have not found a solution to my problem. In short, I have tried to add cron to php:8.1-apache-bullseye and pass it a file with the task that I want the cron service to execute: cron-task content: *…
2
votes
2 answers

What is the correct way to restrict access to Docker containers to only allow sources on LAN

I've been trying to find a way to ensure containers selectively are only accessible from the LAN that the (Linux) docker host is part of. I've seen this question asked/answered on Reddit, Stack, and some random other sites. They simply state when…
2
votes
0 answers

Using docker-compose with multiple actual users on one machine for a single project

A friend and I started working on a project together, and we wanted to try using a single remote dev environment for it. I created a VM on Oracle's Cloud Infrastructure, and created a user for my friend. We have a single repository for the project…
2
votes
0 answers

What's the benefit of Docker Compose Switch over a symlink?

There are at least two ways to use Docker Compose v2 as a drop-in replacement for Docker Compose v1: Compose Switch # ln -s /usr/local/lib/docker/cli-plugins/docker-compose /usr/local/bin/docker-compose From the current README (2.1.0 /…
Christian
  • 141
  • 2
2
votes
2 answers

docker-compose detach keyboard shortcut?

I'm running Docker Desktop 4.2.0 on Windows 10 Pro. Until recently, to detach from containers after running docker-compose up, I could use the keyboard shortcut CTRL + z. This stopped working. How to fix it? I know I can run docker-compose up -d and…
8ctopus
  • 183
2
votes
2 answers

How to limit the sum of memory used by a group of docker containers?

I am using the python API of Docker. How can I limit the memory used by a group of Docker containers? (not on Kubernetes but on a regular, vanilla Docker machine). Let's say we have container A and B: The Sum of both should not exceed 4 GB. I don't…
Hemen
  • 21
1
2 3 4 5 6 7 8