I am not able to create folder inside my container from outside
I installed the HFSQL container Docker image on my Linode shared server. I want to back up my database using the HFSQL Control Centre, but it is unable to create a backup directory inside the container. Do I need to modify any permissions within the container to allow the Control Centre to create the backup directory?
5 Replies
Yes, to allow the HFSQL Control Centre to create a backup directory inside the Docker container, you likely need to modify the permissions within the container itself.
Pl apologize to me for my ignorance, but how do I do that? I am new to the Linux filesystem.
In order to get a list of all Docker containers running on your server, use the command:
docker container ls
Once you have the container name, you would then need to exec
into the container to run commands inside its local shell:
docker exec -it $CONTAINER_NAME /bin/sh
Once inside the container, you can create directories and modify permissions and ownership through the use of standard Linux commands like mkdir, chmod, and chown, respectively:
- mkdir(1): make directories - Linux man page
- chmod(1): change file mode bits - Linux man page
- chown(1): change file owner/group - Linux man page
For more information about Docker commands and how to interact with containers, I would recommend reviewing their documentation:
Thanks I have done it by following command:
chmod -R 777 /opt/hfsql/backup
I have another query..
I have volume on Linode Server and I want to bind this directorty i.e. /mnt/myvolume1 with one of my docker container folder so that all data of that folder of docker container may automatically sync with linode mount.
Linod volume --> /mnt/myvolume1
Docker container folder --> /opt/hfsql/backup
How to do that?
Thanks I have done it by following command:
chmod -R 777 /opt/hfsql/backup
I have another query..
I have volume on Linode Server and I want to bind this directorty i.e. /mnt/myvolume1 with one of my docker container folder so that all data of that folder of docker container may automatically sync with linode mount.
Linod volume --> /mnt/myvolume1
Docker container folder --> /opt/hfsql/backup
How to do that?