Create dockerfile to build docker image

Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
This commit is contained in:
Jérémie Drouet 2019-11-29 19:52:48 +01:00
parent ad89f458c8
commit d088a4b0f9
2 changed files with 21 additions and 0 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
EXAMPLES
Dockerfile
.github

18
Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM debian:buster AS builder
RUN apt-get update \
&& apt-get install -y make gcc \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /workdir
COPY . /workdir
RUN make install
FROM debian:buster-slim
COPY --from=builder /usr/local/lib/libpigpio.so.1 /usr/local/lib/libpigpio.so.1
COPY --from=builder /usr/local/bin/pigpiod /usr/local/bin/pigpiod
RUN ldconfig
CMD ["/usr/local/bin/pigpiod", "-g"]