Skip to content

Commit

Permalink
Add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelmota committed Dec 8, 2020
1 parent 02072f8 commit ed9a15e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
@@ -0,0 +1,11 @@
FROM alpine:3.12 as build

RUN apk add -U curl wget ca-certificates

RUN wget $(curl -s https://api.github.com/repos/miguelmota/ipdr/releases/latest | grep "browser_download_url.*linux.*amd64.tar.gz" | cut -d : -f 2,3 | tr -d \")
RUN tar zxvf *.tar.gz
RUN mv ipdr /ipdr

FROM alpine:3.12
COPY --from=build /ipdr /usr/bin/ipdr
ENTRYPOINT ["ipdr"]
9 changes: 9 additions & 0 deletions Makefile
Expand Up @@ -40,6 +40,15 @@ release:
@rm -rf dist
goreleaser

docker-build:
docker build -t miguelmota/ipdr .

docker-start:
docker run miguelmota/ipdr server

docker-push:
docker push miguelmota/ipdr:latest

.PHONY: help
help: Makefile
@echo
Expand Down

0 comments on commit ed9a15e

Please sign in to comment.