Open aristosv opened 4 years ago
Hi @aristosv
Can you add a new volume for /var/log/mysql and see what the error is?
So I followed your suggestion and added the volume, like this
docker run -d \
--restart=always \
--name rundeck \
-h rundeck \
-e PUID=1001 \
-e PGID=1001 \
-e TZ=Europe/Nicosia \
--net=network \
-p 4440:4440 \
-v rundeck:/var/rundeck \
-v rundeck:/etc/rundeck \
-v rundeck:/var/lib/mysql \
-v rundeck:/var/log/mysql \
-v rundeck:/var/log/rundeck \
-v rundeck:/opt/rundeck-plugins \
-v rundeck:/var/lib/rundeck/logs \
-v rundeck:/var/lib/rundeck/var/storage \
-e EXTERNAL_SERVER_URL=http://192.168.1.23:4440 \
jordan/rundeck:latest
and under /var/log/mysql I found these files
But these files also exist in the root configuration folder of the container
That's not right, is it?
In fact, any volume I browse within the container, I get the same files
So it would make sense for mariadb not to be able to start, if it's path is the same as every other path in the container.
My guess it's something wrong with the way the container is build, it doesn't really allow persistent storage?
I checked my other containers volumes and each volume has it's own directory within the container.
I hope this helps.
Hi @aristosv
Thanks for trying it. I had missed one small detail in your docker run command earlier. You need to give separate directories for each of the volumes. So something like:
docker run -d \
--restart=always \
--name rundeck \
-h rundeck \
-e PUID=1001 \
-e PGID=1001 \
-e TZ=Europe/Nicosia \
--net=network \
-p 4440:4440 \
-v rundeck/var/rundeck:/var/rundeck \
-v rundeck/etc/rundeck:/etc/rundeck \
-v rundeck/var/lib/mysql:/var/lib/mysql \
-v rundeck/var/log/mysql:/var/log/mysql \
-v rundeck/var/log/rundeck:/var/log/rundeck \
-v rundeck/opt/rundeck-plugins:/opt/rundeck-plugins \
-v rundeck/var/lib/rundeck/logs:/var/lib/rundeck/logs \
-v rundeck/var/lib/rundeck/var/storage:/var/lib/rundeck/var/storage \
-e EXTERNAL_SERVER_URL=http://192.168.1.23:4440 \
jordan/rundeck:latest
Thanks for you reply.
I'm no docker expert, but this is what I have so far with all my other containers
On the left side of the : I always use the name of the container, which points to /var/lib/docker/volumes/$containername/_data.
And on the right side of the : I always put the paths of the volumes created by the container.
This way the container can use /var/lib/docker/volumes/$containername/_data to create it's directory structure, as it sees fit.
This is what I do with all my containers, and they all use that path.
So far I never had to manually create directory paths on the left side of the :
But I did try the command you recommended, and this is the error I got.
docker: Error response from daemon: create rundeck/var/rundeck: "rundeck/var/rundeck" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.
Hi @aristosv
I think the problem is that when you start it the original way, docker is not creating the subdirectories and dumping everything under the rundeck directory. I haven't seen this happen before. I usually specify my volume directories so I can point it to an exact location. Can you try testing with an exact path on the left side?
When I specify an exact path on the left side (including separate directories) it works. It's the first time I had to do something like this though.
This is how I usually install my containers. I just specify the container name on the left, and everything is installed in /var/lib/docker/volumes/$containername/_data including any required sub-directories.
I'm assuming it's something that's defined in the Dockerfile?
docker run -d \
--restart=always \
--name mosquitto \
-h mosquitto \
-e PUID=1001 \
-e PGID=1001 \
-e TZ=Europe/Nicosia \
--net=network \
-p 1883:1883 \
-p 9001:9001 \
-v mosquitto:/mosquitto/config \
-v mosquitto:/mosquitto/data \
-v mosquitto:/mosquitto/log \
eclipse-mosquitto
docker run -d \
--restart=always \
--name jellyfin \
-h jellyfin \
-e PUID=1001 \
-e PGID=1001 \
-e TZ=Europe/Nicosia \
--net=network \
-p 8096:8096 \
-v jellyfin:/config \
-v jellyfin:/transcode \
linuxserver/jellyfin
I'll have to take a look. I started the container when docker was still in beta and haven't had anyone mention the issue before. Maybe there's something new that needs to be added as you mentioned :disappointed:
Hello,
I am using this command to set up rundeck in a container.
This is what I get in the log files
And it keeps looping like this. I'm I doing something wrong? Thanks