Skip to content

Commit

Permalink
Merge branch 'testing'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico640 committed May 6, 2020
2 parents 8c7e836 + 727d4e1 commit 925f7ee
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 64 deletions.
20 changes: 4 additions & 16 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,18 @@ build-master:
- master
stage: build
script:
- docker buildx build --platform linux/arm -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA -f Dockerfile.armhf .
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:armhf
- docker push $CI_REGISTRY_IMAGE:armhf
- docker rmi $CI_REGISTRY_IMAGE:armhf
- docker rmi $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA -f Dockerfile --push .

build-tag:
only:
- tags
stage: build
script:
- docker buildx build --platform linux/arm -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA -f Dockerfile.armhf .
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:${CI_COMMIT_TAG}-armhf
- docker push $CI_REGISTRY_IMAGE:${CI_COMMIT_TAG}-armhf
- docker rmi $CI_REGISTRY_IMAGE:${CI_COMMIT_TAG}-armhf
- docker rmi $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA

- docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA -f Dockerfile --push .

build-testing:
only:
- web
stage: build
script:
- docker buildx build --platform linux/arm -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA -f Dockerfile.armhf .
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:testing-armhf
- docker push $CI_REGISTRY_IMAGE:testing-armhf
- docker rmi $CI_REGISTRY_IMAGE:testing-armhf
- docker rmi $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t $CI_REGISTRY_IMAGE:testing-$CI_COMMIT_SHA -f Dockerfile --push .
32 changes: 24 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
FROM library/debian:9.12-slim
FROM debian:9.12-slim AS base
ARG TARGETARCH
ARG TARGETVARIANT

FROM base AS base-amd64
ENV S6_OVERLAY_ARCH=amd64
ENV NODE_ARCH=x64

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

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

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-amd64.tar.gz" \
&& tar -xzf s6-overlay-amd64.tar.gz -C / \
&& tar -xzf s6-overlay-amd64.tar.gz -C /usr ./bin \
&& rm -rf s6-overlay-amd64.tar.gz \
&& 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 \
Expand All @@ -18,9 +34,9 @@ RUN set -x && apt-get update \
ENV NODE_VERSION 10.19.0

RUN set -x \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \
&& tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-x64.tar.gz" \
&& 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
Expand Down
40 changes: 0 additions & 40 deletions Dockerfile.armhf

This file was deleted.

0 comments on commit 925f7ee

Please sign in to comment.