Docker assistance. I created a docker but fat fingered the mapping.

CaffeineMan

Limp Gawd
Joined
Nov 29, 2013
Messages
286
So first I want to say I made a mistake. When I created my docker I mapped a drive that did not exist in the container.
I should also mention I am a noob with Linux and dockers.
I mapped my container folder -v/srv/UUIDofTheDrive/Sharedname/user/Docker/pihole : /etc/piEhole/. I added the e by accident.
My docker is running on OMV. It DOES have nano installed.

The container is a pihole.
I need to edit a file in that folder.
I do not have a file editor on my container. No Nano or vi.
When I tried to install nano I use the commands:

What I have tried:
docker exec -it DOCKERid sh
sudo nano /etc/pihole/pihole-FTL.conf in the command line
the result was
sudo: nano: command not found
I also tried nano /etc/pihole/pihole-FTL.conf
So I tried to install Nano
# apt-get update
Reading package lists... Done
# apt-get -y install nano
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package nano
So I tried to add the folder instead of editing the file.
docker exec -it DOCKERid/bin/bash
RUN echo "export PATH=/new/path:${PATH}" >> /root/.bashrc
bash: RUN: command not found

I would prefer to map the folder correctly so I can edit the file on the mapped drive. Any ideas?
 
Stop the container. Remove it. Recreate it.

Better yet would be using docker-compose, as changes like this (and many others) would be as simple as editing the yaml and restarting it.

If you really want to go off and learn some of the foundations of docker and containers, use `docker volume inspect`
 
Stop the container. Remove it. Recreate it.

Better yet would be using docker-compose, as changes like this (and many others) would be as simple as editing the yaml and restarting it.

If you really want to go off and learn some of the foundations of docker and containers, use `docker volume inspect`
I am using OMV using Portainer. Not sure if I have access to the yaml. But I did find a way to edit the container.

https://documentation.portainer.io/v2.0/containers/duplicate-edit/

I am learning more about it, I have 5 containers on my test box. If I like it I will start over from scratch. I will retain more information if I need to learn more. (It's my learning style).

Thanks!

EDIT: Or maybe not. I tried to edit, and I am not sure if it is going to work. I will update the post tomorrow.

EDIT2: Duplicating\Editing did not work. I will recreate it from scratch.
 
Last edited:
Portainer is OK, but, if you're trying to learn docker, stick to command line for now. Especially if you ever plan on doing docker at anything above a lab scale.
 
Back
Top