Run server with Docker

1. Install Docker: https://docs.docker.com/get-docker/
2. Pull:
docker pull ghcr.io/manasky/lorem-server:latest
3. Create an .env file:
HOST=0.0.0.0:8080
DIR=/app/images
MIN_WIDTH=20
4. Run server:
docker run --env-file=./.env -p 8080:8090 -v ~/Pictures:/app/images ghcr.io/manasky/lorem-server:latest
This will run the server on port 8090 and serves images from ~/Pictures directory
--env-file sets the application environment variables path. .env file exists in the current path.
-p 8080:8080 sets up a port forward. The application container will listen to the 8080 port (set in the .env file as HOST). This flag maps the container's port 8080 to port 8090 on the host (here, your localhost).
~/Pictures:/app/images sets up a bindmount volume that links the directory /app/images from inside the app container to the directory ~/Pictures on the host machine (here, your system). The app image directory is set in the .env file as /app/images, so here the ~/Pictures is mounted to that.
Lorem.space - Placeholder Images (BUT USEFUL!) | Product Hunt