a little about docker #6

Closed
opened 2026-03-11 11:37:35 +00:00 by doesnm · 4 comments
doesnm commented 2026-03-11 11:37:35 +00:00 (Migrated from codeberg.org)

I just have some questions about docker files in this repo:

  1. why docker installation uses export $(cat .env.docker | xargs) instead that environment_file in docker-compose.yml
  2. why package* and node_modules are mounted as volumes if it's usually part of immutable docker container?
I just have some questions about docker files in this repo: 1. why docker installation uses `export $(cat .env.docker | xargs)` instead that `environment_file` in docker-compose.yml 2. why package* and node_modules are mounted as volumes if it's usually part of immutable docker container?
tom79 commented 2026-03-13 10:31:29 +00:00 (Migrated from codeberg.org)

1 - Docker uses a separate .env.docker file. The docker-compose.yml then adds defaults, validates required vars, and rewrites hosts to container names. env_file would pass values as-is without that.

2 - That's only the tunnel service, it shares the relay's source code and dependencies without its own Dockerfile. The relay service itself uses a proper immutable multi-stage build.

1 - Docker uses a separate `.env.docker` file. The `docker-compose.yml` then adds defaults, validates required vars, and rewrites hosts to container names. env_file would pass values as-is without that. 2 - That's only the tunnel service, it shares the relay's source code and dependencies without its own Dockerfile. The relay service itself uses a proper immutable multi-stage build.
doesnm commented 2026-03-13 10:35:25 +00:00 (Migrated from codeberg.org)

That's only the tunnel service, it shares the relay's source code and dependencies without its own Dockerfile. The relay service itself uses a proper immutable multi-stage build.

i still don't sure why you need to pass node_modules and package.json for tunnel, why not using relay container and changing the entrypoint?

> That's only the tunnel service, it shares the relay's source code and dependencies without its own Dockerfile. The relay service itself uses a proper immutable multi-stage build. i still don't sure why you need to pass node_modules and package.json for tunnel, why not using relay container and changing the entrypoint?
doesnm commented 2026-03-13 10:54:17 +00:00 (Migrated from codeberg.org)

also environment and env_file can be used at the same time so you can do what you want

also environment and env_file can be used at the same time so you can do what you want
tom79 commented 2026-03-13 11:26:14 +00:00 (Migrated from codeberg.org)

Thanks for the feedback! I have switched to env_file + environment for overrides, and the tunnel now reuses the relay image instead of mounting volumes.

Thanks for the feedback! I have switched to `env_file` + environment for overrides, and the tunnel now reuses the relay image instead of mounting volumes.
Sign in to join this conversation.
No description provided.