This is a very quick and easy way to install a speed test container on your system with the results being stored in a InfluxDB database.

1. Open up Portainer and select Stacks
2. Click on Add Stack at the top of the page
3. Give the stack a name
4. Paste following into the Web editor section
Code:
version: '2'
services:
  db:
    image: influxdb
    container_name: influxdb
    networks:
      - default
    volumes:
      - /path/to/config/directory/SpeedTest:/var/lib/influxdb
    environment:
      - INFLUXDB_ADMIN_USER=admin
      - INFLUXDB_ADMIN_PASSWORD=password
      - INFLUXDB_DB=speedtest
    restart: unless-stopped
  web:
    image: kjake/internet-speedtest-docker:grafana
    container_name: speedweb
    ports:
      - "3000:3000"
    networks:
      - default
    environment:
      - GF_SERVER_ROOT_URL=http://localhost
      - GF_SECURITY_ADMIN_PASSWORD=teste
    restart: unless-stopped
  testing:
    image: kjake/internet-speedtest-docker:speedtest
    container_name: speedtest
    networks:
      - default
    environment:
      - TEST_INTERVAL=300
    restart: unless-stopped
networks:
  default:
    driver: bridge
4. You will need to change the volume path to wherever you keep your config files
5. Change the TEST_INTERVAL=300 variable to suit your requirements. The default values will run a speedtest every 5 minutes. I have mine set at 3600 which is set to run every hour
6. Once the container has been deployed got to yourip:3000 to see the graph

The original docker page for this image can be found here: Docker Hub