Skip to content

Commit

Permalink
Streamlined Dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
icemarkom committed Sep 6, 2020
1 parent b930076 commit 8220ff4
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,25 @@ ARG go_version="1.15.1"
ARG go="/usr/local/go/bin/go"
ARG pitemp_src="https://github.com/icemarkom/pitemp.git"

RUN apt-get update && apt-get upgrade -y && apt-get install -y gpg git curl
RUN curl https://dl.google.com/go/go${go_version}.linux-$(dpkg --print-architecture).tar.gz -o go.tgz && \
tar xvfz go.tgz -C /usr/local && \
rm go.tgz
COPY .gitconfig /etc/gitconfig
# Builder image
RUN apt-get update && \
apt-get install -y git curl

RUN curl https://dl.google.com/go/go${go_version}.linux-$(dpkg --print-architecture).tar.gz \
| tar xz -C /usr/local

RUN git clone ${pitemp_src} pitemp

WORKDIR pitemp

RUN ${go} build && \
mv pitemp /usr/local/bin/pitemp

# Final image
FROM debian:latest
COPY --from=pitemp-builder /usr/local/bin/pitemp /usr/local/bin
EXPOSE 9550

COPY --from=pitemp-builder /usr/local/bin/pitemp /usr/local/bin/pitemp

ENTRYPOINT ["/usr/local/bin/pitemp"]

CMD ["--help"]

0 comments on commit 8220ff4

Please sign in to comment.