forked from TrueCloudLab/action-env
Create container for Java/Maven + Node.js
Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
This commit is contained in:
commit
b88b0a4b81
2 changed files with 26 additions and 0 deletions
22
Makefile
Normal file
22
Makefile
Normal file
|
@ -0,0 +1,22 @@
|
|||
PUSH?=
|
||||
|
||||
REGISTRY?=git.frostfs.info
|
||||
REGISTRY_NAMESPACE?=truecloudlab
|
||||
REGISTRY_USER?=$(REGISTRY_NAMESPACE)
|
||||
REGISTRY_PASSWORD?=
|
||||
|
||||
IMAGE=$(REGISTRY)/$(REGISTRY_NAMESPACE)/env
|
||||
|
||||
TAGS=$(patsubst %/.,%,$(wildcard */.))
|
||||
.PHONY: $(TAGS)
|
||||
$(TAGS):
|
||||
buildah images
|
||||
cd $@ && buildah bud --tag $(IMAGE):$@ .
|
||||
buildah images
|
||||
ifneq (,$(PUSH))
|
||||
echo $$REGISTRY_PASSWORD | buildah login --username $(REGISTRY_USER) --password-stdin $(REGISTRY)
|
||||
buildah push --rm $(IMAGE):$@ docker://$(IMAGE):$@
|
||||
rm $(REGISTRY_AUTH_FILE)
|
||||
|
||||
export REGISTRY_AUTH_FILE=$(shell mktemp -u)
|
||||
endif
|
4
openjdk-11-maven-3.8.6/Dockerfile
Normal file
4
openjdk-11-maven-3.8.6/Dockerfile
Normal file
|
@ -0,0 +1,4 @@
|
|||
FROM docker.io/node:20-bullseye-slim as node
|
||||
FROM docker.io/maven:3.8.6-openjdk-11
|
||||
COPY --from=node /usr/local /usr/local
|
||||
COPY --from=node /opt /opt
|
Loading…
Reference in a new issue