Open caner-cetin opened 1 year ago
I can see emulators and all that stuff, so container is actually building successfully.
Tried to run with a docker-compose.yml:
version: '3'
services:
app:
container_name: firebase
image: andreysenov/firebase-tools
user: node
command: >
sudo firebase emulators:start
tail -f /dev/null
ports:
- 4000:4000
- 5000:5000
- 5001:5001
- 8080:8080
- 8085:8085
- 9000:9000
- 9005:9005
- 9099:9099
- 9199:9199
volumes:
- ./app_dir:/home/node
volumes:
app_dir:
and got Error: Cannot find module '/home/node/sudo', without sudo, I get:
Hi @DAMACANER ,
Thank you for you feedback.
I'm sorry for late response. I reviewed the Dockerfiles
recently and added packages and peer dependencies needed for firebase-tools
. Please try pulling the latest image.
The guide you mentioned was provided by one of the contributors long time ago. I'll try to review it if your problem exists after pulling newer images.
Thank you
@AndreySenov Unfortunately. Problem still exists. I pulled image today and have the same situation as in this issue. Containers starts and than stops without any logs.
This is because the last line of the dockerfile is CMD ["sh"]
instead of CMD ["firebase", "emulator:start"]
, so you should use the following command to run:
docker run -p 9199:9199 -p 9099:9099 -p 9005:9005 -p 9000:9000 -p 8085:8085 -p 8080:8080 -p 5001:5001 -p 5000:5000 -p 4000:4000 -v /path/to/project:/home/node --name firebase-tools andreysenov/firebase-tools firebase emulators:start --project YOUR_PROJECT
The following docker-compose.yaml works fine:
firebase-emulator:
image: andreysenov/firebase-tools:latest
restart: always
volumes:
- .:/home/node
command:
- "firebase"
- "emulators:start"
- "--project"
- "MY_PROJECT_ID"
ports:
- "9199:9199"
- "9099:9099"
- "9005:9005"
- "9000:9000"
- "8085:8085"
- "8080:8080"
- "5001:5001"
- "5000:5000"
- "4000:4000"
You can try adding -it
like that:
docker run -it -p 9199:9199 -p 9099:9099 -p 9005:9005 -p 9000:9000 -p 8085:8085 -p 8080:8080 -p 5001:5001 -p 5000:5000 -p 4000:4000 -v /path/to/project:/home/node --name firebase-tools andreysenov/firebase-tools
Latest firebase-tools:
Simply just ran:
docker run -p 9199:9199 -p 9099:9099 -p 9005:9005 -p 9000:9000 -p 8085:8085 -p 8080:8080 -p 5001:5001 -p 5000:5000 -p 4000:4000 -v /path/to/project:/home/node --name firebase-tools andreysenov/firebase-tools
as written in https://github.com/AndreySenov/firebase-tools-docker/blob/main/doc/guide/running_firebase_emulators.md
and container exits without doing anything. exit 0, so no error.
huge nothing. my main project is written with Python, but I dont think it is a problem. Help?