Skip to content

Commit

Permalink
Merge branch 'testing'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico640 committed Nov 24, 2020
2 parents 129d4fb + 220f586 commit 88fa2f1
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
-
name: Build and push Docker image
run: docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t nico640/s6-debian-node:latest -f Dockerfile --push .
run: docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t nico640/s6-alpine-node:latest -f Dockerfile --push .
2 changes: 1 addition & 1 deletion .github/workflows/docker-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
-
name: Build and push Docker image
run: docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t nico640/s6-debian-node:$RELEASE_VERSION -f Dockerfile --push .
run: docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t nico640/s6-alpine-node:$RELEASE_VERSION -f Dockerfile --push .
2 changes: 1 addition & 1 deletion .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
-
name: Build and push Docker image
run: docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t nico640/s6-debian-node:testing -f Dockerfile --push .
run: docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t nico640/s6-alpine-node:testing -f Dockerfile --push .
54 changes: 14 additions & 40 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,56 +1,30 @@
FROM debian:9.13-slim AS base
FROM node:12.18.4-alpine3.12 AS base
ARG TARGETARCH
ARG TARGETVARIANT

FROM base AS base-amd64
ENV S6_OVERLAY_ARCH=amd64
ENV NODE_ARCH=x64
ENV S6_OVERLAY_ARCH=amd64 S6_KEEP_ENV=1
ENV APK_ARCH=x86_64

FROM base AS base-arm64
ENV S6_OVERLAY_ARCH=aarch64
ENV NODE_ARCH=arm64
ENV APK_ARCH=aarch64

FROM base AS base-armv7
ENV S6_OVERLAY_ARCH=armhf
ENV NODE_ARCH=armv7l
ENV APK_ARCH=armhf

FROM base-${TARGETARCH}${TARGETVARIANT}

RUN set -x && apt-get update \
&& apt-get install -y curl tzdata locales psmisc procps iputils-ping logrotate \
&& locale-gen en_US.UTF-8 \
&& curl -SLO "https://github.com/just-containers/s6-overlay/releases/download/v1.21.1.1/s6-overlay-${S6_OVERLAY_ARCH}.tar.gz" \
&& tar -xzf s6-overlay-${S6_OVERLAY_ARCH}.tar.gz -C / \
&& tar -xzf s6-overlay-${S6_OVERLAY_ARCH}.tar.gz -C /usr ./bin \
&& rm -rf s6-overlay-${S6_OVERLAY_ARCH}.tar.gz \
&& useradd -u 911 -U -d /config -s /bin/false abc \
&& usermod -G users abc \
&& mkdir -p /app /config /defaults \
&& apt-get clean \
&& rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/* \
&& rm -rf /etc/cron.daily/apt-compat /etc/cron.daily/dpkg /etc/cron.daily/passwd /etc/cron.daily/exim4-base \
&& sed -i "s#/var/log/messages {}.*# #g" /etc/logrotate.conf

ENV NODE_VERSION 10.19.0

RUN set -x \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-${NODE_ARCH}.tar.gz" \
&& tar -xzf "node-v$NODE_VERSION-linux-${NODE_ARCH}.tar.gz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-${NODE_ARCH}.tar.gz" \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
&& npm set prefix /usr/local \
&& npm config set unsafe-perm true

ENV YARN_VERSION 1.21.1

RUN set -ex \
&& curl -fSLO "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& mkdir -p /opt/yarn \
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \
&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \
&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz
RUN set -x && apk add --no-cache curl tzdata logrotate shadow coreutils libstdc++ \
&& curl -SL "https://github.com/just-containers/s6-overlay/releases/download/v2.1.0.2/s6-overlay-${S6_OVERLAY_ARCH}.tar.gz" | tar xvz -C / \
&& groupmod -g 911 users \
&& useradd -u 911 -U -d /config -s /bin/false abc \
&& usermod -G users abc \
&& mkdir -p /app /config /defaults \
&& sed -i "s#/var/log/messages {}.*# #g" /etc/logrotate.conf \
&& rm -rf /var/cache/apk/*

COPY rootfs /

ENTRYPOINT [ "/init" ]
ENTRYPOINT [ "/init" ]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![GitHub Release](https://img.shields.io/github/v/release/Nico640/docker-s6-debian-node?style=flat-square)](https://github.com/nico640/docker-unms/releases)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/Nico640/docker-s6-debian-node/Docker%20CI%20Release?style=flat-square)](https://github.com/Nico640/docker-s6-debian-node/actions?query=workflow%3A%22Docker+CI+Release%22)
[![GitHub Release](https://img.shields.io/github/v/release/Nico640/docker-s6-alpine-node?style=flat-square)](https://github.com/nico640/docker-s6-alpine-node/releases)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/Nico640/docker-s6-alpine-node/Docker%20CI%20Release?style=flat-square)](https://github.com/Nico640/docker-s6-alpine-node/actions?query=workflow%3A%22Docker+CI+Release%22)

# s6-alpine-node
This is a fork of [oznu/docker-s6-alpine-node](https://github.com/oznu/docker-s6-alpine-node) meant for maintaining [nico640/docker-unms](https://github.com/Nico640/docker-unms).
Expand Down

0 comments on commit 88fa2f1

Please sign in to comment.