From 56a925d9d84fe6e971a924c3fd5fba03456aa68a Mon Sep 17 00:00:00 2001 From: Jason Lentink Date: Wed, 29 Dec 2021 02:25:23 +0100 Subject: [PATCH] Updated Dockerfile --- Dockerfile | 3 +-- Makefile | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 18ce231..fcb1879 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ FROM alpine:latest COPY go-transip-dyndns /usr/bin -RUN echo '* * * * * /usr/bin/go-transip-dyndns && echo .' > /etc/crontabs/root -CMD ["crond", "-f", "-l", "2"] \ No newline at end of file +CMD ["/usr/bin/go-transip-dyndns", "update", "-k"] \ No newline at end of file diff --git a/Makefile b/Makefile index aedb043..e85d313 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ BUILT_VERSION=v1.0.2 LDFLAGS=-ldflags "-X main.ApplicationVersion=${BUILT_VERSION} -w -s" TRAVISBUILD?=off all: clean linting test-release +ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) clean: @-rm test-report.out @@ -33,3 +34,9 @@ release: test-release: goreleaser release --rm-dist --skip-validate --skip-publish + +test-docker: + docker run --rm -v ${ROOT_DIR}/go-transip-dyndns.toml:/etc/go-transip-dyndns.toml jlentink/go-transip-dyndns:latest + +test-docker-shell: + docker run -it --rm -v ${ROOT_DIR}/go-transip-dyndns.toml:/etc/go-transip-dyndns.toml jlentink/go-transip-dyndns:latest /bin/sh \ No newline at end of file