[GH-ISSUE #116] How to bind the volume to the inside of the container ? #27

Closed
opened 2026-09-29 12:58:45 +00:00 by slurdge · 7 comments
Owner

Originally created by @spysir on GitHub (Feb 25, 2023).
Original GitHub issue: https://github.com/slurdge/goeland/issues/116

docker run -d -v /root/goeland/config:/config --name=goeland slurdge/goeland:latest

It didn't work !

Originally created by @spysir on GitHub (Feb 25, 2023). Original GitHub issue: https://github.com/slurdge/goeland/issues/116 ```yaml docker run -d -v /root/goeland/config:/config --name=goeland slurdge/goeland:latest ``` It didn't work !
Author
Owner

@slurdge commented on GitHub (Feb 25, 2023):

You should bind to /data like this:

docker run -d -v /root/goeland/config:/data --name=goeland slurdge/goeland:latest

It will autocreate the config.toml. Edit it and then restart the container it should be ok :D

<!-- gh-comment-id:1445134941 --> @slurdge commented on GitHub (Feb 25, 2023): You should bind to /data like this: ``` docker run -d -v /root/goeland/config:/data --name=goeland slurdge/goeland:latest ``` It will autocreate the config.toml. Edit it and then restart the container it should be ok :D
Author
Owner

@spysir commented on GitHub (Feb 25, 2023):

it still doesn't work !
Snipaste_2023-02-25_22-57-14

<!-- gh-comment-id:1445137616 --> @spysir commented on GitHub (Feb 25, 2023): > it still doesn't work ! ![Snipaste_2023-02-25_22-57-14](https://user-images.githubusercontent.com/59646715/221363990-d10be85a-712b-4049-bfee-8a4ba6c8e3e6.jpg)
Author
Owner

@slurdge commented on GitHub (Feb 25, 2023):

Hmmm very strange as I did this exact command line. Do you have the /root/goeland/config folder ? Maybe try to remove it and add it again ? Also, what's your architecture ? x64 or arm or arm64 ? Thanks.

<!-- gh-comment-id:1445143272 --> @slurdge commented on GitHub (Feb 25, 2023): Hmmm very strange as I did this _exact_ command line. Do you have the `/root/goeland/config` folder ? Maybe try to remove it and add it again ? Also, what's your architecture ? x64 or arm or arm64 ? Thanks.
Author
Owner

@spysir commented on GitHub (Feb 25, 2023):

Hmmm very strange as I did this exact command line. Do you have the /root/goeland/config folder ? Maybe try to remove it and add it again ? Also, what's your architecture ? x64 or arm or arm64 ? Thanks.

1.I have created the /root/goeland/config folder
2.My vps architecture is X64,system is Ubuntu20.04
3.When i start the contianer (goeland),it cannot automatically create config.toml
I guess the possible reason is that no Volume is created in the Dockerfile file

<!-- gh-comment-id:1445146826 --> @spysir commented on GitHub (Feb 25, 2023): > Hmmm very strange as I did this _exact_ command line. Do you have the `/root/goeland/config` folder ? Maybe try to remove it and add it again ? Also, what's your architecture ? x64 or arm or arm64 ? Thanks. 1.I have created the `/root/goeland/config` folder 2.My vps architecture is X64,system is Ubuntu20.04 3.When i start the contianer (goeland),it cannot automatically create config.toml I guess the possible reason is that no Volume is created in the Dockerfile file
Author
Owner

@slurdge commented on GitHub (Feb 25, 2023):

The fact that goeland exits is maybe due to a right problem ?
I tried it again from scratch on x64, debian 11 system:

tmp > mkdir goelandconfig
tmp > docker run -d -v /tmp/goelandconfig:/data --name=goeland slurdge/goeland:latest
Unable to find image 'slurdge/goeland:latest' locally
latest: Pulling from slurdge/goeland
8921db27df28: Pull complete
375b19364982: Pull complete
3b3a8f4e49c3: Pull complete
Digest: sha256:47a365b5d5dfa9dde69c22b49082b637e93097d510fbe095b43c6e47c884539e
Status: Downloaded newer image for slurdge/goeland:latest
99a14f3b5c10d8320b021c0709e412362ec8ee9210f36a434830c75d43cb8254
tmp > docker ps -n 1
CONTAINER ID   IMAGE                    COMMAND             CREATED          STATUS          PORTS     NAMES
99a14f3b5c10   slurdge/goeland:latest   "/goeland daemon"   29 seconds ago   Up 27 seconds             goeland
tmp > cat goelandconfig/config.toml
## Log level
## Either "none", "error", "debug", "info"
#loglevel = "none"

## Dry run
## Do not output anything or send email after fecthing the sources
#dry-run = false

## Rest of configfile...
tmp >
<!-- gh-comment-id:1445162909 --> @slurdge commented on GitHub (Feb 25, 2023): The fact that goeland exits is maybe due to a right problem ? I tried it again from scratch on x64, debian 11 system: ```bash tmp > mkdir goelandconfig tmp > docker run -d -v /tmp/goelandconfig:/data --name=goeland slurdge/goeland:latest Unable to find image 'slurdge/goeland:latest' locally latest: Pulling from slurdge/goeland 8921db27df28: Pull complete 375b19364982: Pull complete 3b3a8f4e49c3: Pull complete Digest: sha256:47a365b5d5dfa9dde69c22b49082b637e93097d510fbe095b43c6e47c884539e Status: Downloaded newer image for slurdge/goeland:latest 99a14f3b5c10d8320b021c0709e412362ec8ee9210f36a434830c75d43cb8254 tmp > docker ps -n 1 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 99a14f3b5c10 slurdge/goeland:latest "/goeland daemon" 29 seconds ago Up 27 seconds goeland tmp > cat goelandconfig/config.toml ## Log level ## Either "none", "error", "debug", "info" #loglevel = "none" ## Dry run ## Do not output anything or send email after fecthing the sources #dry-run = false ## Rest of configfile... tmp > ```
Author
Owner

@spysir commented on GitHub (Feb 26, 2023):

The fact that goeland exits is maybe due to a right problem ? I tried it again from scratch on x64, debian 11 system:

tmp > mkdir goelandconfig
tmp > docker run -d -v /tmp/goelandconfig:/data --name=goeland slurdge/goeland:latest
Unable to find image 'slurdge/goeland:latest' locally
latest: Pulling from slurdge/goeland
8921db27df28: Pull complete
375b19364982: Pull complete
3b3a8f4e49c3: Pull complete
Digest: sha256:47a365b5d5dfa9dde69c22b49082b637e93097d510fbe095b43c6e47c884539e
Status: Downloaded newer image for slurdge/goeland:latest
99a14f3b5c10d8320b021c0709e412362ec8ee9210f36a434830c75d43cb8254
tmp > docker ps -n 1
CONTAINER ID   IMAGE                    COMMAND             CREATED          STATUS          PORTS     NAMES
99a14f3b5c10   slurdge/goeland:latest   "/goeland daemon"   29 seconds ago   Up 27 seconds             goeland
tmp > cat goelandconfig/config.toml
## Log level
## Either "none", "error", "debug", "info"
#loglevel = "none"

## Dry run
## Do not output anything or send email after fecthing the sources
#dry-run = false

## Rest of configfile...
tmp >

I put my config.toml to '/root/goeland/config' ,and it works ! So the issue should be that the container cannot autocreate the config.toml

<!-- gh-comment-id:1445264423 --> @spysir commented on GitHub (Feb 26, 2023): > The fact that goeland exits is maybe due to a right problem ? I tried it again from scratch on x64, debian 11 system: > > ```shell > tmp > mkdir goelandconfig > tmp > docker run -d -v /tmp/goelandconfig:/data --name=goeland slurdge/goeland:latest > Unable to find image 'slurdge/goeland:latest' locally > latest: Pulling from slurdge/goeland > 8921db27df28: Pull complete > 375b19364982: Pull complete > 3b3a8f4e49c3: Pull complete > Digest: sha256:47a365b5d5dfa9dde69c22b49082b637e93097d510fbe095b43c6e47c884539e > Status: Downloaded newer image for slurdge/goeland:latest > 99a14f3b5c10d8320b021c0709e412362ec8ee9210f36a434830c75d43cb8254 > tmp > docker ps -n 1 > CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES > 99a14f3b5c10 slurdge/goeland:latest "/goeland daemon" 29 seconds ago Up 27 seconds goeland > tmp > cat goelandconfig/config.toml > ## Log level > ## Either "none", "error", "debug", "info" > #loglevel = "none" > > ## Dry run > ## Do not output anything or send email after fecthing the sources > #dry-run = false > > ## Rest of configfile... > tmp > > ``` I put my config.toml to '/root/goeland/config' ,and it works ! So the issue should be that the container cannot autocreate the config.toml
Author
Owner

@slurdge commented on GitHub (Feb 26, 2023):

I think this is a read/write right problem. I'll close the issue for now, feel free to reopen if you have a repro case. Thanks !

<!-- gh-comment-id:1445321992 --> @slurdge commented on GitHub (Feb 26, 2023): I think this is a read/write right problem. I'll close the issue for now, feel free to reopen if you have a repro case. Thanks !
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: slurdge/goeland#27
No description provided.