feat: adiciona Dockerfile e integração com CI/CD

- Adiciona Dockerfile multi-stage usando Oracle Linux 9
- Instala Oracle Instant Client via RPM
- Adiciona .dockerignore para otimizar builds
- Integra build Docker no GitHub Actions CI
- Configura push automático para GitHub Container Registry
This commit is contained in:
joelson brito
2025-11-14 16:57:46 -03:00
parent 365af3298e
commit 6b1dcd396d
3 changed files with 142 additions and 0 deletions

View File

@@ -121,3 +121,51 @@ jobs:
NODE_ENV: test
continue-on-error: true
docker-build:
name: Docker Build
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push'
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,prefix={{branch}}-
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max