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

Authentication Data Not Displayed in Emulator Suite UI When Running in Docker (Ubuntu 22.04) #1019

Open
sntsris opened this issue Feb 27, 2024 · 0 comments

Comments

@sntsris
Copy link

sntsris commented Feb 27, 2024

Describe the bug
Authentication data does not display in the Emulator Suite UI launched in a Docker environment (ubuntu:22.04).

To Reproduce

  1. Launch the Emulator Suite UI in a Docker.
  2. Add data from app (such as users).
  3. Confirm that the data is not displayed in the Emulator Suite UI.

Expected behavior
I want data added through the app to be displayed on the Emulator Suite UI.

Screenshots

Desktop (please complete the following information):

  • OS:
    • host: MacOS
    • guest: Ubuntu
  • Browser chrome
  • Version

Additional context

I have launched it with Docker and can access it via localhost, but the Emulator Suite UI is making data retrieval requests to 127.0.0.1, which I believe to be the cause.

Do you have a solution?

firebase.json

{
  "emulators": {
    "auth": {
      "host": "0.0.0.0",
      "port": 9099
    },
    "ui": {
      "host": "0.0.0.0",
      "enabled": true
    },
    "singleProjectMode": true
  }
}

Dockerfile

FROM ubuntu:22.04

RUN apt update && \
apt install -y curl openjdk-17-jdk && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt install -y nodejs

RUN npm install -g firebase-tools

docker-compose.yml

...
  firebase:
    build:
      context: ./middlewares/firebase
    volumes:
      - ${LOCAL_WORKSPACE_FOLDER}/middlewares/firebase/.firebaserc:/opt/firebase/.firebaserc
      - ${LOCAL_WORKSPACE_FOLDER}/middlewares/firebase/firebase.json:/opt/firebase/firebase.json
      - ${LOCAL_WORKSPACE_FOLDER}/middlewares/firebase/.cache/:/root/.cache:cached
      - ${LOCAL_WORKSPACE_FOLDER}/middlewares/firebase/.config/:/root/.config:cached
    ports:
      - 9099:9099 # Firebase Authentication
      - 4000:4000 # Emulator Suite UI
    working_dir: /opt/firebase
    command: firebase emulators:start
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

1 participant