Compare commits

...

75 Commits
master ... main

Author SHA1 Message Date
fa9bec5af4
Breaking changes for alpine linux replace by node:18-alpine 2023-09-12 21:03:57 +07:00
4521bed92d
Upgrade pnpm to 8.7.5 2023-09-12 20:35:05 +07:00
9118543a9c
Upgrade pnpm to 8.7.0 2023-08-27 13:04:42 +07:00
68f89a42a8
Upgrade node to 18.17.1 2023-08-14 15:06:57 +07:00
8443f3a779
Upgrade pnpm to 8.6.12 2023-08-07 16:26:46 +07:00
c21a9a84d9
Upgrade pnpm to 8.6.10 2023-07-26 09:00:40 +07:00
77f01ae00f
Upgrade pnpm 8.6.9 2023-07-20 10:57:39 +07:00
272046fb56
Upgrade pnpm to 8.6.6 2023-07-04 09:04:33 +07:00
587c95e246
Upgrade pnpm to 8.6.3 2023-06-20 11:10:49 +07:00
6d84a83350
Upgrade pnpm to 8.6.2 2023-06-16 19:02:58 +07:00
46bb646903
Upgrade pnpm to 8.6.1 2023-06-08 17:41:06 +07:00
86135fbcba
Upgrade pnpm to 8.6.0 2023-05-31 17:39:17 +07:00
8e900dc8c8
Upgrade pnpm to 8.5.1 2023-05-17 09:20:55 +07:00
ed50b3d219
Upgrade pnpm to 8.5.0 2023-05-10 10:58:00 +07:00
bc79a96076
Upgrade nodejs to 18.16.0 2023-05-08 19:46:43 +07:00
8c7b00f746
Upgrade pnpm to 8.4.0 2023-05-05 08:24:24 +07:00
bd7ebc9c1b
Upgrade pnpm to 8.3.1 2023-04-20 08:46:01 +07:00
120738412f
Upgrade pnpm 2023-04-18 18:27:30 +07:00
a231ada791
Upgrade pnpm to 8.2.0 2023-04-10 19:46:01 +07:00
97bc55e0af
Upgrade to nodejs 18 2023-03-31 18:05:03 +07:00
e55dce9e43
Merge branch 'main' of https://github.com/CUBETIQ/calpine-node 2023-03-31 17:50:18 +07:00
4232e490b7
Upgrade pnpm to 8.1.0 2023-03-31 17:49:48 +07:00
Sambo Chea
1aa40a6d75
Merge pull request #7 from CUBETIQ/renovate/codacy-codacy-analysis-cli-action-digest
Update codacy/codacy-analysis-cli-action digest to db33ad5
2023-03-20 08:57:39 +07:00
939c70e7df
Merge branch 'main' of https://github.com/CUBETIQ/calpine-node 2023-03-20 08:52:39 +07:00
d4656630db
Upgrade pnpm to 7.30.0 2023-03-20 08:52:06 +07:00
renovate[bot]
c58626d017
Update codacy/codacy-analysis-cli-action digest to db33ad5 2023-03-17 10:37:04 +00:00
Sambo Chea
a3144ab5b7
Merge pull request #2 from CUBETIQ/renovate/codacy-codacy-analysis-cli-action-digest
Update codacy/codacy-analysis-cli-action digest to 9acc82f
2023-03-09 20:01:27 +07:00
Sambo Chea
dbcd25c55e
Merge pull request #3 from CUBETIQ/renovate/snyk-actions-digest
Update snyk/actions digest to 8061827
2023-03-09 20:01:18 +07:00
Sambo Chea
31484e82ab
Merge pull request #5 from CUBETIQ/renovate/actions-checkout-3.x
Update actions/checkout action to v3
2023-03-09 19:18:00 +07:00
Sambo Chea
8e29d340c7
Merge pull request #6 from CUBETIQ/renovate/github-codeql-action-2.x
Update github/codeql-action action to v2
2023-03-09 19:16:40 +07:00
renovate[bot]
10986cac4b
Update github/codeql-action action to v2 2023-03-09 12:13:05 +00:00
renovate[bot]
6008b44edb
Update actions/checkout action to v3 2023-03-09 12:12:59 +00:00
renovate[bot]
e93c62f308
Update snyk/actions digest to 8061827 2023-03-09 08:48:33 +00:00
renovate[bot]
8518e07b8f
Update codacy/codacy-analysis-cli-action digest to 9acc82f 2023-03-09 08:48:27 +00:00
Sambo Chea
ab5c008846
Merge pull request #1 from CUBETIQ/renovate/configure
Configure Renovate
2023-03-09 15:48:11 +07:00
renovate[bot]
4de38b0b08
Add renovate.json 2023-03-09 04:39:15 +00:00
453e318817
Upgrade pnpm to 7.29.0 2023-03-06 09:54:12 +07:00
b2b359b63b
Upgrade pnpm to 7.28.0 2023-03-04 20:21:44 +07:00
a030476374
Upgrade pnpm to 7.27.0 2023-02-09 09:16:37 +07:00
398ed50e13
Updated pnpm and npm 2023-02-03 19:56:42 +07:00
4eb9a8d71d
Upgrade pnpm to 7.26.0 2023-01-25 08:38:45 +07:00
f9d2884859
Upgrade pnpm to 7.25.0 2023-01-14 14:11:08 +07:00
4a16436000
Add pnpm 7.24.2 2023-01-10 20:20:18 +07:00
c4abd19af5
Upgrade nodejs and pnpm 2022-12-27 20:37:56 +07:00
019e21a5c3
Upgrade pnpm to 7.19.0 2022-12-23 17:09:22 +07:00
94f4692dc8
Upgrade to pnpm 7.18.2 2022-12-19 11:05:28 +07:00
cfed0f429f
Upgrade pnpm to 7.18.1 2022-12-07 19:53:42 +07:00
626db1fa31
Upgrade pnpm to 7.18.0 2022-12-05 09:12:19 +07:00
16c7e3226c
Upgrade pnpm to 7.17.1 2022-11-28 20:13:10 +07:00
067bff735c
Upgrade pnpm to 7.17.0 2022-11-23 10:05:21 +07:00
4f701002de
Upgrade pnpm to 7.16.1 2022-11-19 09:12:05 +07:00
ab35597839
Upgrade pnpm to 7.16.0 2022-11-15 14:45:45 +07:00
d82a5ebbe5
Upgrade pnpm to 7.15.0 2022-11-11 09:08:10 +07:00
5ec58f4b11
Upgrade pnpm to 7.14.2 2022-11-03 18:36:15 +07:00
5cca0a45e6
Upgrade pnpm to 7.13.5 2022-10-18 10:44:06 +07:00
7bb5b26edd
Upgrade pnpm to 7.13.4 2022-10-11 10:02:45 +07:00
b9785f9653
Upgrade pnpm to 7.13.1 2022-10-05 20:33:36 +07:00
e50d1d78dc
Add pnpm 7.13.0 2022-10-03 18:45:01 +07:00
60b0991dd3
Build latest 2022-09-27 21:09:59 +07:00
ecb577f655
Upgrade nodejs to 16.17.1 and pnpm 7.12.2 2022-09-27 15:41:58 +07:00
d5e9587e42
Add yarn for default via npm package 2022-08-30 20:44:34 +07:00
302f400c39
Updated README and examples 2022-08-25 11:53:53 +07:00
a3023036f8
Upgrade nodejs to 16.17.0 and add pnpm 7.9.5 for default 2022-08-25 11:50:36 +07:00
c57953c52d
Fixed image tag 2022-05-06 10:45:16 +07:00
ca6432bdc7
Fixed wrong file 2022-05-06 10:42:21 +07:00
213a15cb3f
Merge branch 'main' of https://github.com/CUBETIQ/calpine-node into main 2022-05-06 10:37:41 +07:00
cb5d8ace85
Upgrade node to 16.15.0 and yarn 1.22.18 and add node git 2022-05-06 10:37:14 +07:00
Sambo Chea
d3f391d0d3
Create snyk-container.yml 2022-03-26 09:37:32 +07:00
Sambo Chea
4184035a4a
Create codacy.yml 2022-03-26 09:37:09 +07:00
e22f13c105
Upgrade nodejs 16.13.1 and yarn 1.22.17 2022-01-08 12:47:29 +07:00
a3d4d2160c
Fixed checksum for node archive 2021-12-23 09:46:57 +07:00
71a598cabf
Updated readme and makefile 2021-12-23 09:18:49 +07:00
ec41473af3
Add node version 16.5 and yarn 1.22.15 2021-12-23 08:56:19 +07:00
Sambo Chea
db3b875005
Update docker-publish.yml 2021-09-26 18:51:12 +07:00
Sambo Chea
82b78116e9
Update docker-publish.yml 2021-07-14 15:04:32 +07:00
13 changed files with 325 additions and 114 deletions

60
.github/workflows/codacy.yml vendored Normal file
View File

@ -0,0 +1,60 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow checks out code, performs a Codacy security scan
# and integrates the results with the
# GitHub Advanced Security code scanning feature. For more information on
# the Codacy security scan action usage and parameters, see
# https://github.com/codacy/codacy-analysis-cli-action.
# For more information on Codacy Analysis CLI in general, see
# https://github.com/codacy/codacy-analysis-cli.
name: Codacy Security Scan
on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '44 1 * * 2'
permissions:
contents: read
jobs:
codacy-security-scan:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
name: Codacy Security Scan
runs-on: ubuntu-latest
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v3
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@db33ad5cfab49143adf0db6e890cf4bb9fb37b1c
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
verbose: true
output: results.sarif
format: sarif
# Adjust severity of non-security issues
gh-code-scanning-compat: true
# Force 0 exit code to allow SARIF file generation
# This will handover control about PR rejection to the GitHub side
max-allowed-issues: 2147483647
# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif

View File

@ -1,8 +1,8 @@
name: Docker CI
on:
release:
types: [created]
push:
branches: [ main ]
jobs:
docker:
@ -10,17 +10,16 @@ jobs:
steps:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_SECRET }}
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
-
name: Build and Push from Makefile
run: |

48
.github/workflows/snyk-container.yml vendored Normal file
View File

@ -0,0 +1,48 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# A sample workflow which checks out the code, builds a container
# image using Docker and scans that image for vulnerabilities using
# Snyk. The results are then uploaded to GitHub Security Code Scanning
#
# For more examples, including how to limit scans to only high-severity
# issues, monitor images for newly disclosed vulnerabilities in Snyk and
# fail PR checks for new vulnerabilities, see https://github.com/snyk/actions/
name: Snyk Container
on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '19 16 * * 0'
jobs:
snyk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build a Docker image
run: docker build -t your/image-to-test .
- name: Run Snyk to check Docker image for vulnerabilities
# Snyk can be used to break the build when it detects vulnerabilities.
# In this case we want to upload the issues to GitHub Code Scanning
continue-on-error: true
uses: snyk/actions/docker@806182742461562b67788a64410098c9d9b96adb
env:
# In order to use the Snyk Action you will need to have a Snyk API token.
# More details in https://github.com/snyk/actions#getting-your-snyk-token
# or you can signup for free at https://snyk.io/login
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: your/image-to-test
args: --file=Dockerfile
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: snyk.sarif

1
.gitignore vendored
View File

@ -0,0 +1 @@
.vscode/

View File

@ -1,103 +1,21 @@
FROM cubetiq/calpine-os-linux:latest
FROM cubetiq/calpine-node:slim
LABEL maintainer="sombochea@cubetiqs.com"
# Build with root access
USER root
# Install PNPM
RUN npm install -g pnpm@latest
ENV NODE_VERSION 14.16.0
ENV USER_UID 1001
# Update NPM package
RUN npm install -g npm@latest
RUN addgroup -g ${USER_UID} node \
&& adduser -u ${USER_UID} -G node -s /bin/sh -D node \
&& apk add --no-cache \
libstdc++ \
&& apk add --no-cache --virtual .build-deps \
curl \
&& ARCH= && alpineArch="$(apk --print-arch)" \
&& case "${alpineArch##*-}" in \
x86_64) \
ARCH='x64' \
CHECKSUM="53cd618bd0cd387d79e954383d67b540ebfbefee9e261800eefff60e1bf38644" \
;; \
*) ;; \
esac \
&& if [ -n "${CHECKSUM}" ]; then \
set -eu; \
curl -fsSLO --compressed "https://unofficial-builds.nodejs.org/download/release/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz"; \
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 \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs; \
else \
echo "Building from source" \
# backup build
&& apk add --no-cache --virtual .build-deps-full \
binutils-gold \
g++ \
gcc \
gnupg \
libgcc \
linux-headers \
make \
python3 \
# gpg keys listed at https://github.com/nodejs/node#release-keys
&& for key in \
4ED778F539E3634C779C87C6D7062848A1AB005C \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
74F12602B6F1C4E913FAA37AD3A89613643B6201 \
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
A48C2BEE680E841632CD4E44F07496B3EB3C1762 \
108F52B48DB57BB0CC439B2997B01419BD92F80A \
B9E2F5981AA6E0CD28160D9FF13993A75599653C \
; do \
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
done \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
&& cd "node-v$NODE_VERSION" \
&& ./configure \
&& make -j$(getconf _NPROCESSORS_ONLN) V= \
&& make install \
&& apk del .build-deps-full \
&& cd .. \
&& rm -Rf "node-v$NODE_VERSION" \
&& rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt; \
fi \
&& rm -f "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" \
&& apk del .build-deps \
# smoke tests
&& node --version \
&& npm --version
# Install yarn from npm package
RUN npm install -g yarn@latest --force
ENV YARN_VERSION 1.22.5
RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
&& for key in \
6A010C5166006599AA17F08146C2130DFD2497F5 \
; do \
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
done \
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& mkdir -p /opt \
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& apk del .build-deps-yarn \
# smoke test
&& yarn --version
# Checking packages version
RUN echo "NODE: $(node --version)" \
&& echo "NPM: $(npm --version)" \
&& echo "NPX: $(npx --version)" \
&& echo "YARN: $(yarn --version)" \
&& echo "PNPM: $(pnpm --version)"
COPY entrypoint.sh /usr/local/bin/
@ -105,4 +23,4 @@ RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
CMD [ "node" ]
CMD [ "node" ]

111
Dockerfile.16-15-0 Normal file
View File

@ -0,0 +1,111 @@
FROM cubetiq/calpine-os-linux:latest
LABEL maintainer="sombochea@cubetiqs.com"
# Build with root access
USER root
ENV NODE_VERSION 16.15.0
ENV NODE_SHA256 4db62cabc0647fc18f537ed10b5573f3c23ffb4d4434e40713e7e472f1ed4e55
ENV USER_UID 1001
RUN addgroup -g ${USER_UID} node \
&& adduser -u ${USER_UID} -G node -s /bin/sh -D node \
&& apk add --no-cache \
libstdc++ \
&& apk add --no-cache --virtual .build-deps \
curl \
&& ARCH= && alpineArch="$(apk --print-arch)" \
&& case "${alpineArch##*-}" in \
x86_64) \
ARCH='x64' \
CHECKSUM=$NODE_SHA256 \
;; \
*) ;; \
esac \
&& if [ -n "${CHECKSUM}" ]; then \
set -eu; \
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 - \
&& 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; \
else \
echo "Building from source" \
# backup build
&& apk add --no-cache --virtual .build-deps-full \
binutils-gold \
g++ \
gcc \
gnupg \
libgcc \
linux-headers \
make \
python3 \
# gpg keys listed at https://github.com/nodejs/node#release-keys
&& for key in \
4ED778F539E3634C779C87C6D7062848A1AB005C \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
74F12602B6F1C4E913FAA37AD3A89613643B6201 \
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
A48C2BEE680E841632CD4E44F07496B3EB3C1762 \
108F52B48DB57BB0CC439B2997B01419BD92F80A \
B9E2F5981AA6E0CD28160D9FF13993A75599653C \
; do \
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
done \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
&& cd "node-v$NODE_VERSION" \
&& ./configure \
&& make -j$(getconf _NPROCESSORS_ONLN) V= \
&& make install \
&& apk del .build-deps-full \
&& cd .. \
&& rm -Rf "node-v$NODE_VERSION" \
&& rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt; \
fi \
&& rm -f "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" \
&& apk del .build-deps \
# smoke tests
&& node --version \
&& npm --version
ENV YARN_VERSION 1.22.18
RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
&& for key in \
6A010C5166006599AA17F08146C2130DFD2497F5 \
; do \
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
done \
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& mkdir -p /opt \
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& apk del .build-deps-yarn \
# smoke test
&& yarn --version
COPY entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
CMD [ "node" ]

12
Dockerfile.git Normal file
View File

@ -0,0 +1,12 @@
FROM cubetiq/calpine-node:latest
LABEL maintainer="sombochea@cubetiqs.com"
RUN apk update && apk add --no-cache git
COPY entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
CMD [ "node" ]

18
Dockerfile.slim Normal file
View File

@ -0,0 +1,18 @@
FROM node:18-alpine
LABEL maintainer="sombochea@cubetiqs.com"
# Update NPM package
RUN npm install -g npm@latest
# Checking packages version
RUN echo "NODE: $(node --version)" \
&& echo "NPM: $(npm --version)" \
&& echo "NPX: $(npx --version)"
COPY entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
CMD [ "node" ]

View File

@ -1,7 +1,14 @@
DOCKER_IMAGE=cubetiq/calpine-node
DOCKER_IMAGE_NAME=${DOCKER_IMAGE}:14
DOCKER_IMAGE_GIT=cubetiq/calpine-node-git
DOCKER_IMAGE_NAME=${DOCKER_IMAGE}:18
build:
@echo 'Starting docker build with slim'
docker build -f Dockerfile.slim . -t ${DOCKER_IMAGE}:slim
@echo 'Starting docker push with slim'
docker push ${DOCKER_IMAGE}:slim
@echo 'Starting docker build'
docker build . -t ${DOCKER_IMAGE}
@ -10,4 +17,28 @@ build:
docker push ${DOCKER_IMAGE}
docker push ${DOCKER_IMAGE_NAME}
.PHONY:build
@echo 'Starting docker build with git'
docker build -f Dockerfile.git . -t ${DOCKER_IMAGE_GIT}
@echo 'Starting docker push with git'
docker push ${DOCKER_IMAGE_GIT}
.PHONY:build
test:
@echo 'Starting docker build with slim'
docker build -f Dockerfile.slim . -t ${DOCKER_IMAGE}:slim
@echo 'Starting docker build'
docker build . -t ${DOCKER_IMAGE}
@echo 'Starting docker run with slim'
docker run --rm -it ${DOCKER_IMAGE}:slim --version
@echo 'Starting docker run'
docker run --rm -it ${DOCKER_IMAGE} --version
@echo 'Starting docker run with git'
docker run --rm -it ${DOCKER_IMAGE_GIT} --version
.PHONY:test

View File

@ -1,21 +1,26 @@
# CUBETIQ Alpine OS Linux with Nodejs 14
# CUBETIQ Alpine OS Linux with Nodejs 18
![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)
- CUBETIQ Alpine OS Linux (3.13.3)
- Nodejs 14 (14.16.0)
- CUBETIQ Alpine OS Linux (Latest)
- Nodejs 18
- PNPM 8 (8.7.5)
# [Docker Hub](https://hub.docker.com/r/cubetiq/calpine-node)
```shell
docker push cubetiq/calpine-node:14
docker push cubetiq/calpine-node:latest
```
# Usage
```shell
docker run --rm -it cubetiq/calpine-node:14 /bin/sh
docker run --rm -it cubetiq/calpine-node:latest /bin/sh
```
# Example
```Dockerfile
FROM cubetiq/calpine-node:latest
LABEL maintainer="sombochea@cubetiqs.com"
@ -24,15 +29,17 @@ WORKDIR /usr/src/app
COPY . /usr/src/app
RUN yarn
RUN pnpm install
CMD [ "node" , "index.js"]
```
# Contributors
- Sambo Chea <sombochea@cubetiqs.com>
- Sambo Chea <sombochea@cubetiqs.com>
# License
```text
MIT License
@ -54,4 +61,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECT
```
```

View File

@ -11,6 +11,6 @@ WORKDIR /app
COPY . /app
RUN yarn
RUN pnpm install
CMD [ "node" , "index.js"]

View File

@ -5,6 +5,6 @@ WORKDIR /usr/src/app
COPY . /usr/src/app
RUN yarn
RUN pnpm install
CMD [ "node" , "index.js"]

6
renovate.json Normal file
View File

@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
]
}