Skip to content

Commit

Permalink
update docker targets
Browse files Browse the repository at this point in the history
  • Loading branch information
drio committed Mar 3, 2023
1 parent cabf87d commit 7d7c908
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ MOD_NAME=caddy-saml-sso
PRJ_NAME=$(MOD_NAME)
BINS=caddy.arm64.osx caddy.amd64.linux caddy.amd64.windows

VERSION=$(shell cat version.go | tail -1| awk -F\" '{print $$2}')

ifeq ($(HOST), air)
include .env.dev
export $(shell sed 's/=.*//' .env.dev)
Expand Down Expand Up @@ -58,13 +60,20 @@ saml-cert:
metadata:
@curl $$SAML_ROOT_URL/saml/metadata

# version=`cat version.go | tail -1| awk -F\" '{print $$2}'`;
docker/login:
export CR_PAT=`cat ./.gh-token`;\
echo $$CR_PAT | docker login ghcr.io -u USERNAME --password-stdin

docker/build:
docker build -t ghcr.io/drio/caddy-saml-sso:latest .

docker/publish:
docker push ghcr.io/drio/caddy-saml-sso:latest
docker build -t ghcr.io/drio/caddy-saml-sso:$(VERSION) .

docker/publish: docker/build
docker push ghcr.io/drio/caddy-saml-sso:$(VERSION)

docker/run:
docker run -p 12000:12000 \
--env-file=.env.dev \
-v ./saml-cert:/saml-cert \
-v ./Caddyfile:/etc/caddy/Caddyfile \
ghcr.io/drio/caddy-saml-sso:$(VERSION) \
/usr/bin/caddy run --config=/etc/caddy/Caddyfile

0 comments on commit 7d7c908

Please sign in to comment.