Compare commits

4 Commits

3 changed files with 17 additions and 10 deletions

View File

@@ -4,7 +4,8 @@ LABEL maintainer="sombochea@cubetiqs.com"
# Build with root access # Build with root access
USER root USER root
ENV NODE_VERSION 14.16.0 ENV NODE_VERSION 16.13.1
ENV NODE_SHA256 3b4c47e5554fa466651a767691fc76c09b6a514b49d79bbd0061e549614adedf
ENV USER_UID 1001 ENV USER_UID 1001
RUN addgroup -g ${USER_UID} node \ RUN addgroup -g ${USER_UID} node \
@@ -17,13 +18,15 @@ RUN addgroup -g ${USER_UID} node \
&& case "${alpineArch##*-}" in \ && case "${alpineArch##*-}" in \
x86_64) \ x86_64) \
ARCH='x64' \ ARCH='x64' \
CHECKSUM="53cd618bd0cd387d79e954383d67b540ebfbefee9e261800eefff60e1bf38644" \ CHECKSUM=$NODE_SHA256 \
;; \ ;; \
*) ;; \ *) ;; \
esac \ esac \
&& if [ -n "${CHECKSUM}" ]; then \ && if [ -n "${CHECKSUM}" ]; then \
set -eu; \ set -eu; \
curl -fsSLO --compressed "https://unofficial-builds.nodejs.org/download/release/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz"; \ DL_ROOT="https://unofficial-builds.nodejs.org/download/release/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz"; \
echo "Downloading Node.js from ${DL_ROOT}"; \
curl -fsSLO --compressed $DL_ROOT; \
echo "$CHECKSUM node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" | sha256sum -c - \ echo "$CHECKSUM node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \ && tar -xJf "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs; \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs; \
@@ -77,7 +80,7 @@ RUN addgroup -g ${USER_UID} node \
&& node --version \ && node --version \
&& npm --version && npm --version
ENV YARN_VERSION 1.22.5 ENV YARN_VERSION 1.22.17
RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
&& for key in \ && for key in \

View File

@@ -1,10 +1,13 @@
DOCKER_IMAGE=cubetiq/calpine-node:14 DOCKER_IMAGE=cubetiq/calpine-node
DOCKER_IMAGE_NAME=${DOCKER_IMAGE}:16
build: build:
@echo 'Starting docker build' @echo 'Starting docker build'
docker build . -t ${DOCKER_IMAGE} docker build . -t ${DOCKER_IMAGE}
@echo 'Starting docker push' @echo 'Starting docker push'
docker tag ${DOCKER_IMAGE} docker tag ${DOCKER_IMAGE} ${DOCKER_IMAGE_NAME}
docker push ${DOCKER_IMAGE} docker push ${DOCKER_IMAGE}
docker push ${DOCKER_IMAGE_NAME}
.PHONY:build .PHONY:build

View File

@@ -1,18 +1,19 @@
# CUBETIQ Alpine OS Linux with Nodejs 14 # CUBETIQ Alpine OS Linux with Nodejs 16
![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/cubetiq/calpine-node) ![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/cubetiq/calpine-node)
![Docker Pulls](https://img.shields.io/docker/pulls/cubetiq/calpine-node) ![Docker Pulls](https://img.shields.io/docker/pulls/cubetiq/calpine-node)
- CUBETIQ Alpine OS Linux (3.13.3) - CUBETIQ Alpine OS Linux (3.13.3)
- Nodejs 14 (14.16.0) - Nodejs 16 (16.13.1)
- Yarn 1.22.17
# [Docker Hub](https://hub.docker.com/r/cubetiq/calpine-node) # [Docker Hub](https://hub.docker.com/r/cubetiq/calpine-node)
```shell ```shell
docker push cubetiq/calpine-node:14 docker push cubetiq/calpine-node:latest
``` ```
# Usage # Usage
```shell ```shell
docker run --rm -it cubetiq/calpine-node:14 /bin/sh docker run --rm -it cubetiq/calpine-node:latest /bin/sh
``` ```
# Example # Example