This commit is contained in:
parent
a049275733
commit
0d0d1a290f
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.git
|
||||||
|
.github
|
||||||
|
README.md
|
39
.github/workflows/docker-publish.yml
vendored
Normal file
39
.github/workflows/docker-publish.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
name: release
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: 0 0 1 * *
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up QEMU (para emular otras arquitecturas)
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
||||||
|
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push multi-arch image
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
platforms: |
|
||||||
|
linux/amd64
|
||||||
|
linux/386
|
||||||
|
tags: docker.io/${{ secrets.DOCKER_REGISTRY_USER }}/base-node:latest
|
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
FROM docker.io/rusian/hyperbola:latest
|
||||||
|
|
||||||
|
ENV NVM_DIR=/root/.nvm
|
||||||
|
ENV NODE_VERSION=lts/*
|
||||||
|
|
||||||
|
RUN pacman -Syu --noconfirm --noprogressbar \
|
||||||
|
&& pacman -S --noconfirm --noprogressbar \
|
||||||
|
base-devel \
|
||||||
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
git \
|
||||||
|
bash \
|
||||||
|
&& pacman -Scc --noconfirm \
|
||||||
|
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash \
|
||||||
|
&& . "$NVM_DIR/nvm.sh" \
|
||||||
|
&& nvm install $NODE_VERSION \
|
||||||
|
&& nvm alias default $NODE_VERSION \
|
||||||
|
&& nvm use default \
|
||||||
|
&& npm install -g npm \
|
||||||
|
&& ln -s "$NVM_DIR/versions/node/$(ls $NVM_DIR/versions/node)/bin/node" /usr/bin/node \
|
||||||
|
&& ln -s "$NVM_DIR/versions/node/$(ls $NVM_DIR/versions/node)/bin/npm" /usr/bin/npm \
|
||||||
|
&& ln -s "$NVM_DIR/versions/node/$(ls $NVM_DIR/versions/node)/bin/npx" /usr/bin/npx
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
|
CMD ["node", "--version"]
|
Loading…
x
Reference in New Issue
Block a user