From 548aa8c91a1c5943852a2285c8722461b6b07cae Mon Sep 17 00:00:00 2001 From: Kim Pepper Date: Thu, 1 Oct 2020 15:28:08 +1000 Subject: [PATCH 1/4] Adds a node legacy container --- node-legacy/Dockerfile | 29 +++++++++++++++++++++++++++++ node-legacy/Makefile | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 node-legacy/Dockerfile create mode 100644 node-legacy/Makefile 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: * From a1a76f200b255c835887445ccc84af96ae7319e2 Mon Sep 17 00:00:00 2001 From: Kim Pepper Date: Thu, 1 Oct 2020 15:31:55 +1000 Subject: [PATCH 2/4] Adds node-legacy container --- .circleci/config.yml | 1 + .gitignore | 1 + 2 files changed, 2 insertions(+) create mode 100644 .gitignore diff --git a/.circleci/config.yml b/.circleci/config.yml index fc405a9..0f0a12a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,6 +13,7 @@ dirs: &dirs - mailhog - passenger - node + - node-legacy - php-apache - pnx-packager - sftp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f11b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ From 9ee59ca5b674dfe726a52d7a154daf6a097556c3 Mon Sep 17 00:00:00 2001 From: Kim Pepper Date: Thu, 1 Oct 2020 15:51:18 +1000 Subject: [PATCH 3/4] Ignore pinned versions --- node-legacy/.hadolint.yaml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 node-legacy/.hadolint.yaml diff --git a/node-legacy/.hadolint.yaml b/node-legacy/.hadolint.yaml new file mode 100644 index 0000000..0464523 --- /dev/null +++ b/node-legacy/.hadolint.yaml @@ -0,0 +1,2 @@ +ignored: + - DL3018 From 7149e35ebdd3110c10f29993090998bd12636faa Mon Sep 17 00:00:00 2001 From: Kim Pepper Date: Thu, 1 Oct 2020 16:03:58 +1000 Subject: [PATCH 4/4] Use skpr base image --- node-legacy/Dockerfile | 26 ++++---------------------- node-legacy/Makefile | 18 +++++++++--------- 2 files changed, 13 insertions(+), 31 deletions(-) diff --git a/node-legacy/Dockerfile b/node-legacy/Dockerfile index 15dfcd4..cf9f2c7 100644 --- a/node-legacy/Dockerfile +++ b/node-legacy/Dockerfile @@ -1,29 +1,11 @@ -ARG NODE_VERSION=10 -ARG ALPINE_VERSION=3.10 -FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} +ARG VERSION=10 +FROM skpr/node:${VERSION} + +USER root 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 index 6fd6315..87321d8 100644 --- a/node-legacy/Makefile +++ b/node-legacy/Makefile @@ -1,13 +1,13 @@ #!/usr/bin/make -f -IMAGE=skpr/node +IMAGE=previousnext/node-legacy define buildimage - docker build --build-arg ALPINE_VERSION=$(1) --build-arg NODE_VERSION=$(2) -t $(IMAGE):$(2)-$(3) . + docker build --build-arg VERSION=$(1) -t $(IMAGE):$(1) . endef define pushimage - docker push $(IMAGE):$(1)-$(2) + docker push $(IMAGE):$(1) endef build: build10 build12 build14 @@ -16,17 +16,17 @@ lint: hadolint Dockerfile build10: - $(call buildimage,3.10,10,1.x) + $(call buildimage,10-1.x) build12: - $(call buildimage,3.10,12,1.x) + $(call buildimage,12-1.x) build14: - $(call buildimage,3.10,14,1.x) + $(call buildimage,14-1.x) push: build - $(call pushimage,10,1.x) - $(call pushimage,12,1.x) - $(call pushimage,14,1.x) + $(call pushimage,10-1.x) + $(call pushimage,12-1.x) + $(call pushimage,14-1.x) .PHONY: *