Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container exits without doing anything. No log, no execution, nothing. #38

Open
caner-cetin opened this issue Apr 5, 2023 · 6 comments

Comments

@caner-cetin
Copy link

Latest firebase-tools:
image

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.

image

huge nothing. my main project is written with Python, but I dont think it is a problem. Help?

@caner-cetin
Copy link
Author

I can see emulators and all that stuff, so container is actually building successfully.
image

@caner-cetin
Copy link
Author

caner-cetin commented Apr 5, 2023

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:

image

@AndreySenov
Copy link
Owner

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

@Tomek6789
Copy link

@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.

@twkevinzhang
Copy link

twkevinzhang commented Jun 21, 2023

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"

@sharaf84
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants