Closed WalterWampe closed 4 years ago
Nevermind, i figured it out. If anyone else struggles with this, here is the solution:
In the same folder create a file .env
which contains your variables:
DISPLAY_WIDTH=2560
DISPLAY_HEIGHT=1440
KEEP_APP_RUNNING=1
VNC_PASSWORD=test
then in your docker-copose file access them like this:
version: '3'
services:
firefox:
container_name: firefox
image: jlesage/firefox
ports:
- "5800:5800"
volumes:
- "/opt/firefox:/config:rw"
restart: unless-stopped
shm_size: '1g'
build: .
environment:
- VNC_PASSWORD=${VNC_PASSWORD}
- DISPLAY_WIDTH=${DISPLAY_WIDTH}
- DISPLAY_HEIGHT=${DISPLAY_HEIGHT}
- KEEP_APP_RUNNING=${KEEP_APP_RUNNING}
Thats it!
I think that your original issue was the usage of :
instead of =
. It should be:
environment:
- DISPLAY_WIDTH=2560
- DISPLAY_HEIGHT=1440
Instead of:
environment:
- DISPLAY_WIDTH:2560
- DISPLAY_HEIGHT:1440
You are right, thank you!
I am struggeling with writing my docker-compose and set my resolution. Currently it looks like this:
is this correct?