Questions tagged [docker-compose]
The docker-compose tag has no usage guidance.
89
questions
8
votes
0
answers
12k
views
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 ...
4
votes
3
answers
9k
views
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 ...
4
votes
1
answer
5k
views
“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: ...
3
votes
1
answer
10k
views
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 ...
3
votes
1
answer
1k
views
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 ...
2
votes
1
answer
2k
views
how should I set the volume of docker-swarm
I am planning to move docker-compose to docker-swarm for multi nodes.
I have used docker-compose like this below
version: '3'
services:
python:
container_name: python
build: ./python
...
2
votes
1
answer
339
views
How to check smart status from within a Docker container?
I would like to run this command from within a docker-compose container:
nvme smart-log /dev/nvme0n1p1
Unfortunately I get this error:
/dev/nvme1n1p1: No such file or directory
How do I map this ...
2
votes
1
answer
2k
views
How to get QEMU to use a named Docker interface?
Question
Is it possible to get QEMU to use a named Docker interface and network on the same host machine?
Motivating exmaple:
Let's say I have a DHCP server in a Docker container with static IP ...
2
votes
1
answer
247
views
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 ...
2
votes
0
answers
1k
views
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 ...
2
votes
0
answers
1k
views
Auto rebuild docker container after any code change
I'm running two containers using docker-compose. Is there an option to force docker-compose to rebuild and to run the container after any code change? If so, I would like to get an example. If it isn'...
1
vote
1
answer
610
views
Docker get a list of possible environment variables
Hello! After intensive research I decided to bring this question up to the community. I started learning docker & docker-compose not long ago.
My question is:
How can I get a list of the possible ...
1
vote
1
answer
715
views
How does Docker Desktop work on Linux (Ubuntu)?
I was using Docker CLI when working with Linux. But recently I reinstalled my system so wanted to try Desktop version: enabled KVM, made sure file sharing thing is working, initialized pass thing, ...
1
vote
2
answers
669
views
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:
...
1
vote
1
answer
1k
views
Why won't journalctl show logs when the program output is piped?
I'm trying to run my docker-compose containers via a systemd service, and have fail2ban read their logs. However, docker-compose adds a prefix like:
container_name_1 | Actual log message
So what I'...
1
vote
1
answer
2k
views
docker-compose build error for nodejs and yarn: [gpg: no valid OpenPGP data found.]
I have been trying to get a project to work for my job. I recently got a M1 Air, however I had a similar issues when I was doing the same thing on a Windows machine with WSL. The error is as follows:
...
1
vote
1
answer
829
views
Xubuntu 20.4, Xdebug 3 and Docker: Impossible to connect from container to host
I've been struggling with this for some time and here I am :-)
I have a php container with xdebug installed in a Ubuntu 20.04 laptop:
rest-example-php-8:
container_name: rest-php
build: ./...
1
vote
2
answers
2k
views
Getting WordPress on an Nginx proxy to work with a subdirectory
I'm trying to use the WordPress official Docker container to serve content from https://example.com/blog. An Nginx instance sits in front of WordPress and handles all the SSL-ishness. Nginx is ...
1
vote
0
answers
70
views
New to self-hosting and struggling with Monica CRM Docker setup (503 Error)
As someone new to self-hosting, I embarked on what I thought would be a relatively simple project: setting up Monica CRM using Docker. However, I've encountered an unexpected challenge and am seeking ...
1
vote
1
answer
1k
views
Error when setting up Ansible AWX
Im setting up Ansible AWX on my Windows 10 machine using docker-compose. When running the install playbook ansible-playbook -i inventory install.yml I get the error below. Im able to see the login ...
1
vote
0
answers
74
views
Launch docker container from power shell fail, unexpected behavior?
I have created the following script in powershell for two objectives:
read from an .env file the setup of the local urls of my development environment and deploy them to the Windows hosts file.
take ...
1
vote
0
answers
655
views
Persist Prometheus data from a Docker Container
I'm running Prometheus and Grafana from docker-compose and basically it works. But I don't get my prometheus data to persist on my host machine.
As soon as I switch my volume settings from
---
version:...
1
vote
0
answers
1k
views
Docker compose Error response from daemon, Ports are not available on Windows 11
I have following docker-compose.yml file:
services:
## NGINX
nginx:
container_name: zl-nginx
image: redis:alpine
restart: unless-stopped
networks:
- reza
ports:
- ...
1
vote
0
answers
835
views
How to add WireGuard container to internal Docker network to add internet connectivity?
I have two Docker networks:
public which is a normal bridge network with access to the host upstream network
private which is a bridge, internal: true and hosts a fleet of containers
networks:
...
1
vote
2
answers
7k
views
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 ...
1
vote
1
answer
875
views
Pass SSH options to docker-compose when deploying to a remote server (using DOCKER_HOST var)
I'm using a Vagrantbox to regularly test the setup of a physical machine. This is handled by a bash script on Ubuntu, Vagrant and Virtualbox.
The setup and provisioning of the VM works. Now I want to ...
1
vote
0
answers
2k
views
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-...
1
vote
0
answers
904
views
Mounting CIFS using hostname doesn't work
This comes from an old suggestion https://github.com/moby/moby/pull/39250 on an issue. I am trying to mount a CIFS volume, config it via IP worked for me but when I try to config it using a hostname ...
1
vote
1
answer
251
views
ROS in docker-compose leads to "bash: line 0: cd: MYPROJECT: No such file or directory"
I am a clear beginner at docker and I try to create a docker-compose where two containers can see each other. It could be that this question is a duplicate of many others about the "No such file ...
1
vote
0
answers
455
views
How to change a file in /etc inside a docker container using dockerfile?
I have a docker application, I want to append the word "Hellow" to the passwd file inside the docker container. I made this change to Dockerfile:
RUN echo "Hellow" >> /etc/...
1
vote
0
answers
1k
views
Docker-proxy prevents container to start after reboot
I have a PC used as a NAS running a NextCloud instance as a set of docker containers managed via docker-compose, I'll provide the docker-compose.yml below. My problem is that, even though all my ...
1
vote
1
answer
577
views
Can user privilege of docker container impact permission of host machine on mounted volume in docker-compose.yml?
I have docker-compose.yml as below,
version: '2'
services:
mysql:
image: centos/mysql-56-centos7:latest
restart: always
container_name: mysql
environment:
- ...
0
votes
1
answer
3k
views
Mount SMB share (CIFS) to container using secured credentials or token
I have a docker-compose setup that runs my Linux development environment on Windows. A number of these containers need to mount smb drives using LDAP credentials. The way this woks now is by adding a ...
0
votes
1
answer
723
views
How to install latest docker-compose without docker desktop
I have installed docker this way https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
└─$ docker --version
Docker version 24.0.5, build 24.0.5-0ubuntu1~20.04.1
then trying to ...
0
votes
1
answer
444
views
IP address removed from docker0 bridge on QEMU/KVM virtual machine
I'm renting a virtualized server running Ubuntu 22.04 and I'm trying to run Docker containers within it. The server is virtualized with qemu-kvm.
Unfortunatly, the containers don't have network access....
0
votes
2
answers
2k
views
Nextcloud Docker status keeps "Restarting (255)"
I'm running a Nextcloud instance in docker-compose on my Raspi 4 at home for some years now and update the images about every two months.
My pi stopped working during todays NC update from 25.0.3 to ...
0
votes
1
answer
103
views
what is the docker-compose.exporters.yml in this repo and how to call it?
I was reviewing a repo for a monitoring system and I saw a docker composer like this\
Repo link
I ran the project as usual by docker-compose up, but I want to know what is docker-compose.exporters....
0
votes
1
answer
1k
views
caddy-docker-proxy to host port
I'm running cockpit on port 9090 on my host machine.
In a docker container on the host is the caddy-docker-proxy.
The reverse proxy (RP) container is linked to the host ports 80 and 443.
Is there any ...
0
votes
1
answer
114
views
Upgraded docker but old configuration is running after reboot
I upgraded my Docker install on my Ubuntu system the other day. According to my docker version command I am on version 19.03.8 for the client and 18.09.9 on the server. I had my original docker-...
0
votes
1
answer
477
views
unable to run "docker-compose up" after replaced Docker Desktop for Windows by Docker Toolbox
Scenario: I had my docker-compose.yml working as expected when I was using Docker Desktop For Windows (here is Windows 10 Pro). Since I had to use also Virtual Box + Minishift in same Notebook I read ...
0
votes
1
answer
25
views
Failed to set the root user to MongoDB
I have created a MongoDB docker container with the following compose.yaml
---
services:
mongodb:
image: "docker.io/library/mongo:7.0.11"
container_name: mongodb
restart: unless-...
0
votes
1
answer
11
views
Docker Compose network isolation mechanism in Linux
When I deploy Docker Compose services, I found that the Docker containers are all on one bridged linux segment; this much is expected. However, sometimes I have had problems connecting from one linux ...
0
votes
1
answer
49
views
Linux Docker compose container cannot ping another bridged Docker container
Overview
I need a Docker Compose zabbix host to ping a host on a containerlab docker network.
These two Docker networks run under a linux Docker host machine as below... This information comes from ...
0
votes
0
answers
34
views
Nextcloud android app does not work with the community nextcloud docker image, and caddy as a reverse proxy
I want to setup nextcloud in my home server with the following (in order of importance):
Nextcloud is fast on a web browser and phone
Nextcloud is encrypted with trusted SSL certificates, but without ...
0
votes
1
answer
225
views
"Operation not permitted" when accessing a NFS mounted directory inside a docker container
I am working on a Web-App which needs access to a QNAP-NAS file system to edit and create directories and files inside it.
In order to mount the NFS to the docker container, I used the following ...
0
votes
0
answers
47
views
Rebooting breaks dns-server docker container
This is my ~/docker-webdev-stack/docker-compose.yml
services:
dns-server:
container_name: dns-server
hostname: dns-server
image: technitium/dns-server:latest
# For DHCP deployments, ...
0
votes
0
answers
64
views
Firewalling Docker Compose
I'm trying to operate Docker Compose containers behind a firewall on Debian 12. I cannot get access to the host machine (set up to be host.docker.local in the containers) to work within the containers ...
0
votes
1
answer
101
views
How do I configure Docker containers for Traefik Proxy correctly?
I was trying to test out Traefik Proxy, so I added Traefik labels to an existing Compose file I had for OpenSpeedTest.
version: '3.3'
services:
speedtest:
restart: unless-stopped
...
0
votes
0
answers
49
views
can't docker-compose up all at once on ec2 t2.micro
I have 3 services in my compose.yaml, 2 web apps and nginx proxy manager,
on ec2 if I call sudo docker-compose up it will eventually freeze and the instance will become unresponsive ( I have to reboot ...
0
votes
1
answer
217
views
Is it possible to change the default user of docker minio/minio:latest from root to any other username/group?
I am using minio/minio:latest image in my docker-compose.yaml file, and I want the minio docker container to have a user other than root.
after checking the /usr/bin/docker-entrypoint.sh shipped with ...