The docker-compose file looks like this:
version: '2'
services:
portainer_agent:
image: portainer/agent:latest
container_name: portainer_agent
restart: unless-stopped
ports:
- 9001:9001
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
environment:
AGENT_CLUSTER_ADDR: tasks.agent
and it's giving this error:
Creating portainer_agent ... error
ERROR: for portainer_agent Cannot start service portainer_agent: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "./agent": stat ./agent: no such file or directory: unknown
I tried to find if anyone had this error on the internet and I couldn't find it anywhere.
so here i am i just created an account here.
i really don't know where to start, this error is from inside the container.
Related
I want to run a docker-compose file but I keep getting
ERROR: for service2 Cannot start service service2: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "./wait.sh": stat ./wait.sh: no such file or directory: unknown
and my docker-compose file is
version: "3"
services:
service1:
restart: always
container_name: service1
build: ./service1
environment:
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
service2:
container_name: service2
build: ./service2
environment:
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
depends_on:
- service1
restart: "no"
volumes:
- ./data.csv:/data.csv
command: ["./wait.sh", "service1:5432", "--", "python", "./service2.py"]
but if I go and try to build Dockerfile for service2 everything is ok and I can run wait.sh.
Here's Dockerfile for service2:
FROM python:latest
WORKDIR /service2
RUN pip install psycopg2==2.8.6
COPY ./service2.py .
COPY ./wait.sh ./wait.sh
RUN chmod +x ./wait.sh
I completely don't get what's wrong especially because when I first ran docker-compose up the same error occured. But after that error did not occur for several times I ran docker-compose up and now again it doesn't work though I run the same docker-compose file.
wait.sh was taken from here
service2.py connects to db and writes from data.scv but since it doesn't even run that should not be the problem.
I'm trying to build my ark server on my v-server. But I have problems to start my docker-compose container. Here is the YAML file:
version: '3'
services:
ark-server:
image: 'turzam/ark:latest'
container_name: 'ark-server'
restart: always
ports:
- '7778:7778'
- '7778:7778/udp'
- '27015:27015'
- '27015:27015/udp'
- '32330:32330'
volumes:
- ./data:/ark
environment:
SESSIONNAME: "Raphis's Server"
SERVERMAP: 'TheCenter'
SERVERPASSWORD: 'pass'
ADMINPASSWORD: 'password'
TZ: 'Europe/Berlin'
When I start it up with docker-compose up -d
I get the following error message:
Starting ark-server ... error
ERROR: for ark-server Cannot start service ark-server: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/c919d8e4e2d51b934d561a928cfd55e0f7af07a2a3a0ac3d52b3c5ba3cea14e6/log.json: no such file or directory): runc did not terminate sucessfully: unknown
ERROR: for ark-server Cannot start service ark-server: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/c919d8e4e2d51b934d561a928cfd55e0f7af07a2a3a0ac3d52b3c5ba3cea14e6/log.json: no such file or directory): runc did not terminate sucessfully: unknown
ERROR: Encountered errors while bringing up the project.
So how can I fix it?
Your yaml syntax is wrong
you can use this website to verify your yaml syntax : http://www.yamllint.com/
So your Yaml file will be like this :
version: '3'
services:
ark-server:
image: turzam/ark:latest
container_name: 'ark-server'
restart: always
ports:
- '7778:7778'
- '7778:7778/udp'
- '27015:27015'
- '27015:27015/udp'
- '32330:32330'
volumes:
- ./data:/ark
environment:
SESSIONNAME: "Raphis's Server"
SERVERMAP: 'TheCenter'
SERVERPASSWORD: 'pass'
ADMINPASSWORD: 'password'
TZ: 'Europe/Berlin'
I am trying to get a nextcloud + mariadb + nginx docker-compose up and running locally, but I am stuck when it comes to the nginx.conf file. I am following this guide at the base-fpm section. Here is the docker-compose.yml file, what I ran in my CLI and the error i got:
version: '2'
volumes:
nextcloud:
db:
services:
db:
image: mariadb
restart: always
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=mypw
- MYSQL_PASSWORD=mypw
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
app:
image: nextcloud:fpm
restart: always
links:
- db
volumes:
- nextcloud:/var/www/html
environment:
- MYSQL_PASSWORD=mypw
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=db
web:
image: nginx
restart: always
ports:
- 8080:80
links:
- app
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
volumes_from:
- app
$ docker-compose up
Creating network "nextcloud_default" with the default driver
Creating volume "nextcloud_nextcloud" with default driver
Creating volume "nextcloud_db" with default driver
Creating nextcloud_db_1 ... done
Creating nextcloud_app_1 ... done
Creating nextcloud_web_1 ... error
ERROR: for nextcloud_web_1 Cannot start service web: OCI runtime create failed:
container_linux.go:370: starting container process caused: process_linux.go:459: container init
caused: rootfs_linux.go:59: mounting "/home/nowak/docker/nextcloud/nginx.conf" to rootfs at
"/var/lib/docker/overlay2/4869db7f0302ec8b7e5f4328b861e64627daa78728d443913052cecd1cd095a9/merge
d/etc/nginx/nginx.conf" caused: not a directory: unknown: Are you trying to mount a directory
onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: for web Cannot start service web: OCI runtime create failed: container_linux.go:370:
starting container process caused: process_linux.go:459: container init caused:
rootfs_linux.go:59: mounting "/home/nowak/docker/nextcloud/nginx.conf" to rootfs at
"/var/lib/docker/overlay2/4869db7f0302ec8b7e5f4328b861e64627daa78728d443913052cecd1cd095a9/merge
d/etc/nginx/nginx.conf" caused: not a directory: unknown: Are you trying to mount a directory
onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.
Do I need to create a nginx.conf file and place it in my work directory?
The guide does mention this:
The configuration for nginx is stored in the configuration file nginx.conf, that is mounted into the container. An example can be found in the examples section here.
But when I follow that link, I can't seem to find any example of nginx.conf files.
Looks like other people are also searching for the file, so I'll add the link from my comment to the right file here:
https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf
I created machine:
docker-machine create -v virtualbox docker-local
Switched to machine:
eval ($docker-machine env docker-local)
Now, Im trying to run docker-compose on it to serve my apps on this machine.
This are my files:
docker-compose.yml
version: "3"
services:
db:
image: mysql:5.7
container_name: db
ports:
- '3306:3306'
environment:
MYSQL_DATABASE: 'test'
MYSQL_ROOT_PASSWORD: 'asdasd123'
command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
app:
build:
context: .
dockerfile: ./dockerfiles/python/Dockerfile
container_name: app
volumes:
- ./app:/app
- static:/app/static
- media:/app/media
command: >
./wait-for-it.sh db:3306 --timeout=30 --strict -- ./run.sh
expose:
- "8000"
depends_on:
- db
nginx:
container_name: nginx
restart: always
build:
context: .
dockerfile: ./dockerfiles/nginx/Dockerfile
volumes:
- ./nginx:/etc/nginx/conf.d
- ./nginx_logs:/var/log/nginx
- ./nginx_html:/html
- ./ssl_cert:/etc/nginx/conf.d/certs/
- static:/static
- media:/media
ports:
- "1337:80"
- "443:443"
depends_on:
- app
volumes:
static:
media:
If i lauch this docker-compose.yml using docker-compose up everything works fine in local pc, however on virtualbox machine - error accured:
Creating db ... done
Creating app ... error
ERROR: for app Cannot start service app: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: \"./wait-for-it.sh\": stat ./wait-for-it.sh: no such file or directory": unknown
ERROR: for app Cannot start service app: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: \"./wait-for-it.sh\": stat ./wait-for-it.sh: no such file or directory": unknown
ERROR: Encountered errors while bringing up the project.
Why is this happening only on docker-machine? Why it has no access to wait-for-it.sh here?
I am trying to pull image of whatsapp core and run them in docker in my linux machine, I am providing code of docker-compose.yml
**
for biz_wacore_1 Cannot start service wacore: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/opt/whatsapp/bin/wait_on_postgres.sh\": stat /opt/whatsapp/bin/wait_on_postgres.sh: no such file or directory
** is error I am having
Tried using docker-compose up with sudo command
code in my docker-compose.yml
services:
wacore:
image: docker.whatsapp.biz/coreapp:v2.19.4
command: ["/opt/whatsapp/bin/wait_on_postgres.sh", "/opt/whatsapp/bin/launch_within_docker.sh"]
volumes:
- whatsappMedia:/usr/local/wamedia
env_file:
- db.env
environment:
# This is the version of the docker templates being used to run WhatsApp Business API
WA_RUNNING_ENV_VERSION: v2.2.3
ORCHESTRATION: DOCKER-COMPOSE
depends_on:
- "db"
network_mode: bridge
links:
- db
waweb:
image: docker.whatsapp.biz/web:v2.19.4
command: ["/opt/whatsapp/bin/wait_on_postgres.sh", "/opt/whatsapp/bin/launch_within_docker.sh"]
ports:
- "9090:443"
volumes:
- whatsappMedia:/usr/local/wamedia
env_file:
- db.env
environment:
WACORE_HOSTNAME: wacore
# This is the version of the docker templates being used to run WhatsApp Business API
WA_RUNNING_ENV_VERSION: v2.2.3
ORCHESTRATION: DOCKER-COMPOSE
depends_on:
- "db"
- "wacore"
links:
- db
- wacore
network_mode: bridge