firebase / firebase/firebase-tools-ui

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

Open
#1,019 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
291
Forks
74
PR merge metrics
No merged PRs in 30d

Description

**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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.