Skip to content

Instantly share code, notes, and snippets.

View zeroc0d3's full-sized avatar
👌
Building Awesome Time (Infrastructure As Code)

Dwi Fahni Denni (dfdenni) zeroc0d3

👌
Building Awesome Time (Infrastructure As Code)
View GitHub Profile
@zeroc0d3
zeroc0d3 / Dockerfile-CICD
Last active February 13, 2024 13:38
Dockerfile for Build CI/CD Container (devopscorner/cicd) --- From NGINX 1.23-Alpine
FROM nginx:${NGINX_VERSION:-1.23-alpine}
ARG BUILD_DATE
ARG BUILD_VERSION
ARG GIT_COMMIT
ARG GIT_URL
ENV VENDOR="DevOpsCornerId"
ENV AUTHOR="DevOpsCorner.id <[email protected]>"
ENV IMG_NAME="cicd-alpine"
@zeroc0d3
zeroc0d3 / app-compose.yml
Last active February 13, 2024 13:41
Build Container CI/CD (devopscorner/cicd) with Docker Compose
version: "3.7"
#================================================================================================
# NETWORK SETUP
#================================================================================================
networks:
devopscorner_net:
name: devopscorner_net
driver: bridge
ipam:
@zeroc0d3
zeroc0d3 / run-docker.sh
Created December 9, 2022 06:40
Build Container Image from Docker Compose (app-compose.yml) File
#!/usr/bin/env sh
# -----------------------------------------------------------------------------
# Docker Build Container
# -----------------------------------------------------------------------------
# Author : Dwi Fahni Denni (@zeroc0d3)
# License : Apache v2
# -----------------------------------------------------------------------------
set -e
TITLE="DOCKER BUILD CONTAINER SCRIPT" # script name
@zeroc0d3
zeroc0d3 / ecr-push.sh
Last active February 13, 2024 13:41
Push CI/CD Container Image to ECR (Elastic Container Registry)
#!/usr/bin/env sh
# -----------------------------------------------------------------------------
# Docker Push Container (Elastic Container Registry - ECR)
# -----------------------------------------------------------------------------
# Author : Dwi Fahni Denni
# License : Apache v2
# -----------------------------------------------------------------------------
set -e
export AWS_ACCOUNT_ID=$1
@zeroc0d3
zeroc0d3 / ecr-tag.sh
Last active February 13, 2024 13:37
Tag CI/CD Container Image for ECR (Elastic Container Registry)
#!/usr/bin/env sh
# -----------------------------------------------------------------------------
# Docker Tag Container (Elastic Container Registry - ECR)
# -----------------------------------------------------------------------------
# Author : Dwi Fahni Denni
# License : Apache v2
# -----------------------------------------------------------------------------
set -e
export AWS_ACCOUNT_ID=$1
@zeroc0d3
zeroc0d3 / ecr-build.sh
Last active February 13, 2024 13:41
Build CI/CD Container Image for ECR (Elastic Container Registry)
#!/usr/bin/env sh
# -----------------------------------------------------------------------------
# Docker Build Container (Elastic Container Registry - ECR)
# -----------------------------------------------------------------------------
# Author : Dwi Fahni Denni
# License : Apache v2
# -----------------------------------------------------------------------------
set -e
export AWS_ACCOUNT_ID=$1
@zeroc0d3
zeroc0d3 / dockerhub-tag.sh
Last active February 13, 2024 13:43
Tag CI/CD Container Image for Dockerhub Registry
#!/usr/bin/env sh
# -----------------------------------------------------------------------------
# Docker Tag Container (DockerHub)
# -----------------------------------------------------------------------------
# Author : Dwi Fahni Denni
# License : Apache v2
# -----------------------------------------------------------------------------
set -e
# export CI_PROJECT_PATH="devopscorner"
@zeroc0d3
zeroc0d3 / dockerhub-push.sh
Last active February 13, 2024 13:43
Push CI/CD Container Image to Dockerhub Registry
#!/usr/bin/env sh
# -----------------------------------------------------------------------------
# Docker Push Container (DockerHub)
# -----------------------------------------------------------------------------
# Author : Dwi Fahni Denni
# License : Apache v2
# -----------------------------------------------------------------------------
set -e
# export CI_PROJECT_PATH="devopscorner"
@zeroc0d3
zeroc0d3 / dockerhub-build.sh
Last active February 13, 2024 13:45
Build CI/CD Container Image for Dockerhub Registry
#!/usr/bin/env sh
# -----------------------------------------------------------------------------
# Docker Build Container (DockerHub)
# -----------------------------------------------------------------------------
# Author : Dwi Fahni Denni
# License : Apache v2
# -----------------------------------------------------------------------------
set -e
# export CI_PROJECT_PATH="devopscorner"