DEV Community

Jinna Balu
Jinna Balu

Posted on

1

Deploy firefox as container

Firefox + Caddy + HTTPS for firefox.jinnabalu.local

Create the folder and create the following files, here is the tree, configuration is available in github repo infinite-docker-compose

firefox tree
.
├── Caddyfile
└── docker-compose.yml

1 directory, 2 files
Enter fullscreen mode Exit fullscreen mode
  1. docker-compose.yml
services:
  firefox:
    image: lscr.io/linuxserver/firefox:latest
    container_name: firefox
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    ports:
      - "3001:3001"
    shm_size: "1gb"
    restart: unless-stopped

  caddy:
    image: caddy:latest
    container_name: caddy
    depends_on:
      - firefox
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile
      - caddy_data:/data
      - caddy_config:/config
    restart: unless-stopped

volumes:
  caddy_data:
  caddy_config:
Enter fullscreen mode Exit fullscreen mode
  1. Caddyfile
firefox.jinnabalu.local {
    reverse_proxy firefox:3001
    tls internal
}
Enter fullscreen mode Exit fullscreen mode

Update the host for mapping the domain, this is not required if you are mapping to the DNS records from the internet registry.

sudo nano /etc/hosts

Add the following record

127.0.0.1 firefox.jinnabalu.local

Finally run the application docker compose up -d, open https://firefox.jinnabalu.local

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay