diff --git a/.circleci/config.yml b/.circleci/config.yml index 17c7f5c..47a7097 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,6 +6,7 @@ dirs: &dirs - kubebuilder - nginx - node + - node-legacy - php - solr diff --git a/node-legacy/Dockerfile b/node-legacy/Dockerfile new file mode 100644 index 0000000..15dfcd4 --- /dev/null +++ b/node-legacy/Dockerfile @@ -0,0 +1,29 @@ +ARG NODE_VERSION=10 +ARG ALPINE_VERSION=3.10 +FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} + +RUN apk add --no-cache \ + bash \ + ca-certificates \ + g++ \ + git \ + make \ + openssh-client \ + python2 \ + # Below are for packages such as https://www.npmjs.com/package/imagemin + autoconf \ + automake \ + libpng-dev \ + libtool \ + nasm \ + ruby \ + ruby-dev \ + ruby-bundler + +RUN deluser node +RUN adduser -D -u 1000 skpr +RUN mkdir /data && chown skpr:skpr /data + +WORKDIR /data + +USER skpr diff --git a/node-legacy/Makefile b/node-legacy/Makefile new file mode 100644 index 0000000..6fd6315 --- /dev/null +++ b/node-legacy/Makefile @@ -0,0 +1,32 @@ +#!/usr/bin/make -f + +IMAGE=skpr/node + +define buildimage + docker build --build-arg ALPINE_VERSION=$(1) --build-arg NODE_VERSION=$(2) -t $(IMAGE):$(2)-$(3) . +endef + +define pushimage + docker push $(IMAGE):$(1)-$(2) +endef + +build: build10 build12 build14 + +lint: + hadolint Dockerfile + +build10: + $(call buildimage,3.10,10,1.x) + +build12: + $(call buildimage,3.10,12,1.x) + +build14: + $(call buildimage,3.10,14,1.x) + +push: build + $(call pushimage,10,1.x) + $(call pushimage,12,1.x) + $(call pushimage,14,1.x) + +.PHONY: *