use llm generated content
This commit is contained in:
28
.gitea/workflows/docker-publish.yml
Normal file
28
.gitea/workflows/docker-publish.yml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
name: 🚀 Build & Push tofu-node Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
workflow_dispatch: # ✅ permet de déclencher manuellement depuis l'UI
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Login to Gitea Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: gitea.arcodange.duckdns.org
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.PACKAGES_TOKEN }}
|
||||||
|
|
||||||
|
- name: 🐳 Build and Push Docker image
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
gitea.arcodange.duckdns.org/${{ github.repository }}:latest
|
||||||
|
gitea.arcodange.duckdns.org/${{ github.repository }}:${{ github.sha }}
|
||||||
24
.gitea/workflows/test-container.yml
Normal file
24
.gitea/workflows/test-container.yml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: 🧪 Test tofu-node container
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch: # ✅ déclenchable manuellement depuis Gitea UI
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: gitea.arcodange.duckdns.org/arcodange-org/docker.tofu:latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: ✅ Test Node
|
||||||
|
run: node -v
|
||||||
|
|
||||||
|
- name: ✅ Test tofu
|
||||||
|
run: tofu --version
|
||||||
|
|
||||||
|
- name: ✅ Test git, ssh, jq, yq
|
||||||
|
run: |
|
||||||
|
git --version
|
||||||
|
ssh -V
|
||||||
|
jq --version
|
||||||
|
yq --version
|
||||||
25
Dockerfile
Normal file
25
Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
FROM node:lts-alpine
|
||||||
|
|
||||||
|
LABEL maintainer="Arcodange arcodange@gmail.com"
|
||||||
|
LABEL description="Image minimaliste avec OpenTofu, Node.js, git, curl, jq, yq, openssh"
|
||||||
|
|
||||||
|
# Dépendances système
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
bash \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
openssh \
|
||||||
|
jq \
|
||||||
|
yq \
|
||||||
|
ca-certificates
|
||||||
|
|
||||||
|
# Installer OpenTofu via le script officiel
|
||||||
|
# Variables
|
||||||
|
ENV TOFU_VERSION="1.10.3"
|
||||||
|
RUN curl -fsSL https://get.opentofu.org/install-opentofu.sh | bash -s -- --install-method standalone --opentofu-version ${TOFU_VERSION} --skip-verify
|
||||||
|
|
||||||
|
# Vérifications (optionnel)
|
||||||
|
RUN node -v && npm -v && tofu -version && git --version && ssh -V && jq --version && yq --version
|
||||||
|
|
||||||
|
ENV PATH="/usr/local/bin:${PATH}"
|
||||||
|
CMD [ "/bin/sh"]
|
||||||
23
README.md
23
README.md
@@ -0,0 +1,23 @@
|
|||||||
|
# 🐳 tofu-node (Alpine)
|
||||||
|
|
||||||
|
Image Docker **ultra-légère** pour CI/CD avec :
|
||||||
|
|
||||||
|
- 🧠 Node.js LTS (alpine)
|
||||||
|
- 🌱 OpenTofu (dernier stable)
|
||||||
|
- 🔧 git, curl, jq, yq
|
||||||
|
|
||||||
|
## ✅ Contenu
|
||||||
|
|
||||||
|
| Outil | Version |
|
||||||
|
|-----------|------------------------|
|
||||||
|
| Node.js | LTS (via Alpine) |
|
||||||
|
| OpenTofu | Dernière release |
|
||||||
|
| jq | via apk |
|
||||||
|
| yq | via apk (mikefarah/yq) |
|
||||||
|
| git, curl | via apk |
|
||||||
|
|
||||||
|
## 🧪 Exemple d'usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -it ghcr.io/your-org/tofu-node:latest sh
|
||||||
|
```
|
||||||
14
build.sh
Executable file
14
build.sh
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
IMAGE_NAME="docker.tofu"
|
||||||
|
ORG="arcodange-org" # à remplacer
|
||||||
|
TAG="latest"
|
||||||
|
|
||||||
|
echo "🔨 Building $ORG/$IMAGE_NAME:$TAG..."
|
||||||
|
docker build -t gitea.arcodange.duckdns.org/$ORG/$IMAGE_NAME:$TAG .
|
||||||
|
|
||||||
|
echo "✅ Build complete."
|
||||||
|
echo "🔍 Testing..."
|
||||||
|
docker run --rm gitea.arcodange.duckdns.org/$ORG/$IMAGE_NAME:$TAG tofu -version
|
||||||
|
docker run --rm gitea.arcodange.duckdns.org/$ORG/$IMAGE_NAME:$TAG node -v
|
||||||
Reference in New Issue
Block a user