Spaces:
Runtime error
Runtime error
Download Dockerfile from Kaballas/postgresql-hosting: direct link, hf CLI and curl.
- Browser
- Download file 555 Bytes
-
https://huggingface.co/spaces/Kaballas/postgresql-hosting/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Kaballas/postgresql-hosting/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Kaballas/postgresql-hosting/resolve/main/Dockerfile
555 Bytes
| FROM postgres:17 | |
| # Create user with UID 1000 (required by HF Spaces) | |
| RUN useradd -m -u 1000 user | |
| # Set environment variables | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| POSTGRES_PASSWORD=password \ | |
| POSTGRES_USER=postgres \ | |
| POSTGRES_DB=postgres \ | |
| PGDATA=/home/user/pgdata | |
| # Create data directory with correct permissions | |
| RUN mkdir -p /home/user/pgdata && \ | |
| chown -R user:user /home/user/pgdata | |
| # Switch to user | |
| USER user | |
| WORKDIR $HOME/app | |
| # Expose PostgreSQL port | |
| EXPOSE 5432 | |
| # Start PostgreSQL | |
| CMD ["postgres"] | |