Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Non-root Parity Docker container unable to use volumes #9827

Closed
thodges-gh opened this issue Oct 29, 2018 · 2 comments
Closed

Non-root Parity Docker container unable to use volumes #9827

thodges-gh opened this issue Oct 29, 2018 · 2 comments
Assignees
Labels
F5-documentation 📑 Documentation needs fixing, improving or augmenting. P2-asap 🌊 No need to stop dead in your tracks, however issue should be addressed as soon as possible.
Milestone

Comments

@thodges-gh
Copy link

  • Parity Ethereum version: v2.0.9-stable-09f7757-20181028
  • Operating system: Linux host running Docker container
  • Installation: Docker :stable tag
  • Fully synchronized: n/a
  • Network: n/a
  • Restarted: yes

I noticed this issue on the :stable Docker tag recently. The Parity container is unable to write to a volume created with docker volume create when using --base-path or --db-path.

Steps to reproduce

Pull the latest :stable Docker tag:

docker pull parity/parity:stable

Create the Docker volume:

docker volume create --name parity-test

Run the Parity Docker container using the new volume:

docker run -p 8546:8546 -v parity-test:/data \
            -it parity/parity:stable --chain ropsten \
           --ws-interface all --ws-origins "all" \
           --base-path /data

Observe returned error:

Error upgrading parity data: CannotCreateConfigPath

Expected behavior

This may just be a simple documentation fix, but the expected behavior is a docker run command that can utilize the volume created by Docker. The existing Docker documentation may need an update anyway.

@jam10o-new
Copy link
Contributor

Hey, I agree that this might need an emergency documentation change. Parity doesn't run as the root user in docker anymore, so any volumes need to be mounted or chowned to the parity user/uid 1000.

For some background, here's why:
#9689

(I'll leave this open to remind myself to actually update the docker wiki page asap 😅)

@jam10o-new jam10o-new added P2-asap 🌊 No need to stop dead in your tracks, however issue should be addressed as soon as possible. F5-documentation 📑 Documentation needs fixing, improving or augmenting. labels Oct 29, 2018
@jam10o-new jam10o-new self-assigned this Oct 29, 2018
@levino
Copy link

levino commented Nov 7, 2018

I posted a working docker-compose file which also works in docker swarm.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F5-documentation 📑 Documentation needs fixing, improving or augmenting. P2-asap 🌊 No need to stop dead in your tracks, however issue should be addressed as soon as possible.
Projects
None yet
Development

No branches or pull requests

4 participants