Merge pull request #11 from wojas/add-dockerfile

Add a Dockerfile
pull/14/head
bert hubert 2019-09-28 14:39:50 +02:00 committed by GitHub
commit 49a9dbfa66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 0 deletions

25
Dockerfile 100644
View File

@ -0,0 +1,25 @@
FROM ubuntu:disco
ENV DEBIAN_FRONTEND noninteractive
ENV LC_ALL C.UTF-8
# This allows you to use a local Ubuntu mirror
ARG APT_URL=
ENV APT_URL ${APT_URL:-http://archive.ubuntu.com/ubuntu/}
RUN sed -i "s%http://archive.ubuntu.com/ubuntu/%${APT_URL}%" /etc/apt/sources.list
# Update packages and install dependencies
RUN apt-get update && apt-get -y upgrade && apt-get -y clean
RUN apt-get install -y protobuf-compiler libh2o-dev libcurl4-openssl-dev \
libssl-dev libprotobuf-dev libh2o-evloop-dev libwslay-dev \
make gcc g++ build-essential curl autoconf automake libfmt-dev libncurses5-dev \
&& apt-get -y clean
# Build
ARG MAKE_FLAGS=-j2
ADD . /galmon/
WORKDIR /galmon/
RUN make $MAKE_FLAGS
ENV PATH=/galmon:${PATH}

View File

@ -32,6 +32,26 @@ Goals:
Works on Linux (including Raspbian on Pi Zero W), OSX and OpenBSD.
Build in Docker
---------------
To build it in Docker:
```
git clone https://github.com/ahupowerdns/galmon.git --recursive
docker build -t galmon --build-arg MAKE_FLAGS=-j2 .
```
To run a container with a shell in there:
```
docker run -it --rm galmon
```
Build locally
-------------
To get started, make sure you have a C++17 compiler, git, protobuf-compiler.
Then run 'make ubxtool navdump' to build the receiver-only tools.
@ -53,6 +73,9 @@ library installed. If you get an error about 'wslay', do the following, and run
echo WSLAY=-lwslay > Makefile.local
```
Running
-------
Once compiled, run for example `./ubxtool --wait --port /dev/ttyACM0
--station 1 --stdout | ./ubxparse 10000 html null`