-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Parity does not work out of the box with Docker Compose/Swarm #10173
Description
- Parity Ethereum version:
v2.2.6-beta-e9396e1-20190109
- Operating system: Linux
- Installation: Docker
- Fully synchronized: N/A
- Network: N/A
- Restarted: N/A
The following run-of-the-mill docker-compose/swarm file will not function correctly and instead error as described in #9827. this issue was debated a bit over in #9689 but at the time I (and I think others) didn't fully realize that the problem is not just "can't upgrade parity version automatically" but actually is a more fundamental problem that makes it so you cannot run the official docker images via Docker Swarm.
version: '3.6'
services:
parity:
command: '--base-path /mnt'
#entrypoint: '/home/parity/bin/parity'
image: 'parity/parity:stable'
#user: 'root'
volumes:
- type: 'volume'
source: 'parity'
target: '/mnt'
#working_dir: '/home/parity'
volumes:
parity:
external: true
If you uncomment the selected lines you can get it working by bypassing the startup script, but this has the notable risk that a future docker image update may become backward incompatible because you are using a custom entrypoint.
Ideally, I think Parity should revisit the "run as parity user inside the docker image" decision as I think that is just security theater rather than actual security. Second to that, someone should fix the docker image so that it actually works out of the box in common environments (like docker swarm).