Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a legacy node container #74

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dirs: &dirs
- kubebuilder
- nginx
- node
- node-legacy
- php
- solr

Expand Down
29 changes: 29 additions & 0 deletions node-legacy/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
32 changes: 32 additions & 0 deletions node-legacy/Makefile
Original file line number Diff line number Diff line change
@@ -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: *