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

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay