Install Glance Inside Docker Container on Linux

Install Glance Inside Docker Container on Linux

Glance is an open-source dashboard tool that lets you create a personalized feed reader by aggregating content from multiple sources. Since you have full control over it, you can customize it to focus on the content that's most relevant to you.

This tutorial explains how to install Glance inside a Docker container on Linux. Commands have been tested on Ubuntu.

Prepare environment

Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.

Install Glance

Create directory to store configuration file:

sudo mkdir /opt/glance

Glance configuration is done through YAML file. Create a new file:

sudo nano /opt/glance/glance.yml

Here's simple example:

pages:
  - name: Home
    columns:
      - size: full
        widgets:
          - type: weather
            location: London, United Kingdom
            units: metric
            hour-format: 12h
          - type: releases
            cache: 1d
            repositories:
              - glanceapp/glance

This configuration file creates a "Home" page with a full-width layout displaying a weather widget for London and a release widget showing the latest updates from the glanceapp/glance repository.

  • Host network

Run the following command to create a container for Glance that uses host network:

docker run -d --name=glance --restart=always --network=host \
    -v /opt/glance:/app/config \
    glanceapp/glance
  • User-defined bridge network

User-defined bridge network can be used for listening on different port. By default, Glance service is listening on port 8080. It can be changed with -p option.

docker network create app-net
docker run -d --name=glance --restart=always --network=app-net \
    -p 8081:8080 \
    -v /opt/glance:/app/config \
    glanceapp/glance

Testing Glance

To access Glance dashboard, open a web browser and navigate to http://<IP_ADDRESS>, replacing <IP_ADDRESS> with the system's IP address.

Glance Inside Docker Container on Linux

Uninstall Glance

To completely remove Glance, remove its container:

docker rm --force glance

Remove Glance image:

docker rmi glanceapp/glance

You can also remove Glance config:

sudo rm -rf /opt/glance

If a user-defined bridge network was created, you can delete it as follows:

docker network rm app-net

Leave a Comment

Cancel reply

Your email address will not be published.