Skip to content

Commit

Permalink
chore: Update Dockerfile to use Alpine-based Node image
Browse files Browse the repository at this point in the history
- create the k8s/kustomization.yaml files
  • Loading branch information
carlohcs committed Aug 12, 2024
1 parent a31ba49 commit 76b8b87
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/gc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,5 @@ jobs:
# replacing the image name in the k8s template
./kustomize edit set image $GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY/$IMAGE:TAG=$GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA
./kustomize build k8s | kubectl apply -f -
# kubectl apply -f k8s/node-deployment.yaml --validate=false
# kubectl apply -f k8s/node-service.yaml --validate=false
kubectl rollout status deployment/$DEPLOYMENT_NAME
kubectl get services -o wide
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/amd64 node:22.0.0
FROM --platform=linux/amd64 node:22-alpine

WORKDIR /app

Expand Down
10 changes: 10 additions & 0 deletions k8s/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- node-deployment.yaml
- node-service.yaml

images:
- name: carlohcs/kubernetes-ci-cd-github-actions
newTag: latest

0 comments on commit 76b8b87

Please sign in to comment.