feat: add image with nodejs
Some checks failed
release / deploy (push) Failing after 16s

This commit is contained in:
Ondrej Vlach 2023-12-03 00:44:21 +01:00
parent 4e44cba3a3
commit 8a4a557c07
Signed by: ovlach
GPG Key ID: 4FF1A23B4914DE70
3 changed files with 14 additions and 3 deletions

View File

@ -24,5 +24,10 @@ jobs:
- name: Build and push docker - name: Build and push docker
run: | run: |
docker build . -t git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/nano-rust:latest -t git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/nano-rust:1.74.${{steps.git.outputs.short_hash}} && \ docker build . -t git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/nano-rust:latest -t git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/nano-rust:1.74.${{steps.git.outputs.short_hash}} && \
docker build . -f Dockerfile.nodejs -t git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/nano-rust-nodejs:latest && \
-t git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/nano-rust-nodejs:1.74.${{steps.git.outputs.short_hash}} && \
--build-arg BASE_IMAGE=git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/nano-rust:1.74.${{steps.git.outputs.short_hash}} &&\
docker push git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/nano-rust:1.74.${{steps.git.outputs.short_hash}} && \ docker push git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/nano-rust:1.74.${{steps.git.outputs.short_hash}} && \
docker push git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/nano-rust:latest docker push git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/nano-rust:latest && \
docker push git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/nano-rust-nodejs:1.74.${{steps.git.outputs.short_hash}} && \
docker push git.nanobyte.cz/$GITHUB_REPOSITORY_OWNER/nano-rust-nodejs:latest

6
Dockerfile.nodejs Normal file
View File

@ -0,0 +1,6 @@
ARG BASE_IMAGE "git.nanobyte.cz/nanobyte/nano-rust:latest"
FROM ${BASE_IMAGE}
RUN apt-get install -y ca-certificates curl gnupg
RUN mkdir -p /etc/apt/keyrings && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_21.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update && apt-get install -y nodejs && rm -rf /var/cache/apt*

View File

@ -1,11 +1,11 @@
#!/bin/bash #!/bin/bash
export CARGO_REGISTRIES_GITEA_NANOBYTE_CREDENTIAL_PROVIDER=cargo:token export CARGO_REGISTRIES_GITEA_NANOBYTE_CREDENTIAL_PROVIDER=cargo:token
export CARGO_REGISTRIES_GITEA_NANOBYTE_TOKEN=$1 export CARGO_REGISTRIES_GITEA_NANOBYTE_TOKEN="Bearer $1"
export CARGO_REGISTRIES_GITEA_NANOBYTE_INDEX=sparse+https://git.nanobyte.cz/api/packages/nanobyte/cargo/ export CARGO_REGISTRIES_GITEA_NANOBYTE_INDEX=sparse+https://git.nanobyte.cz/api/packages/nanobyte/cargo/
export CARGO_REGISTRIES_GITEA_OVLACH_CREDENTIAL_PROVIDER=cargo:token export CARGO_REGISTRIES_GITEA_OVLACH_CREDENTIAL_PROVIDER=cargo:token
export CARGO_REGISTRIES_GITEA_OVLACH_TOKEN=$1 export CARGO_REGISTRIES_GITEA_OVLACH_TOKEN="Bearer $1"
export CARGO_REGISTRIES_GITEA_OVLACH_INDEX=sparse+https://git.nanobyte.cz/api/packages/ovlach/cargo/ export CARGO_REGISTRIES_GITEA_OVLACH_INDEX=sparse+https://git.nanobyte.cz/api/packages/ovlach/cargo/
shift shift