Skip to content

Docker image to run the Linux GPS deamon (gpsd) on a Raspberry Pi as a network service that can be consumed by other services.

License

Notifications You must be signed in to change notification settings

jfig/rpi-docker-gpsd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rpi-docker-gpsd

This Docker image facilitates the running of the Linux GPS daemon (gpsd) on a Raspberry Pi, making it available as a network service. gpsd is a daemon that monitors one or more GPSes or AIS receivers attached to a host computer through serial or USB ports.

Docker image: jfig/rpi-docker-gpsd

Github repo: https://github.com/jfig/rpi-docker-python-gpio

Prerequisites

Ensure Docker is installed on your Raspberry Pi.

Usage

To use gpsd, the GPS device's serial port needs to be mapped to the Docker container. This is essential for gpsd to communicate with the GPS device.

The default command to run the container is:

docker run --rm -it --device=/dev/ttyACM0:/dev/ttyUSB0 -p 2947:2947 gpsd

Here's what each parameter does:

--rm: Automatically remove the container when it exits.
-it: Interactive mode; allows you to interact with the container.
--device=/dev/ttyACM0:/dev/ttyUSB0: Maps the GPS device from the host (Raspberry Pi) to the container.
-p 2947:2947: Exposes the gpsd port, allowing network access to the service.

Example docker/compose file

version: '3'

services:
  gpsd:
    image: jfig/rpi-docker-gpsd
    devices:
      - "/dev/ttyACM0:/dev/ttyUSB0
    ports:
      - "2947:2947"
    restart: always

  gps-consumer:
    image: your-gps-consumer-image  # Replace with your actual GPS consumer Docker image
    depends_on:
      - gpsd
    environment:
      GPSD_HOST: gpsd
      GPSD_PORT: 2947
    restart: always

About

Docker image to run the Linux GPS deamon (gpsd) on a Raspberry Pi as a network service that can be consumed by other services.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published