add helper for surfer-cli

Signed-off-by: Felix Bartels <felix@host-consultants.de>
This commit is contained in:
Felix Bartels 2020-06-07 08:46:47 +02:00
parent c2adfee79c
commit dcdb451a8e
2 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,4 @@
FROM node:lts-alpine3.11
RUN apk add --no-cache make python
# use --unsafe to not execute post actions as user nobody
RUN npm -g install cloudron-surfer@5.9.0 --unsafe && npm cache clean --force

21
helpers/surfer/Makefile Normal file
View file

@ -0,0 +1,21 @@
DOCKER_REPO ?= fbartels
DOCKER_IMAGE := cloudron-surfer
VERSION := $(shell grep cloudron-surfer Dockerfile | cut -d' ' -f 5 | cut -d@ -f 2)
.PHONY: default
default: build
.PHONY: build
build:
docker build . -t $(DOCKER_IMAGE)
.PHONY: tag
tag: build
docker tag $(DOCKER_IMAGE) $(DOCKER_REPO)/$(DOCKER_IMAGE):latest
docker tag $(DOCKER_IMAGE) $(DOCKER_REPO)/$(DOCKER_IMAGE):$(VERSION)
.PHONY: push
push: tag
docker push $(DOCKER_REPO)/$(DOCKER_IMAGE):latest
#docker push $(DOCKER_REPO)/$(DOCKER_IMAGE):$(VERSION)