Skip to content

Instantly share code, notes, and snippets.

@tacocode-dev
Forked from chris-cmsoft/Makefile
Created September 5, 2021 00:36
Show Gist options
  • Save tacocode-dev/ebc723194f79b3ad1309a7ff83b7b669 to your computer and use it in GitHub Desktop.
Save tacocode-dev/ebc723194f79b3ad1309a7ff83b7b669 to your computer and use it in GitHub Desktop.
TLDR - Laravel In Kubernetes Part 3
# Registry Credentials
export REGISTRY_URL=registry.gitlab.com
export REGISTRY_USER=XXX
export REGISTRY_PASS=XXX # You can also use your Gitlab token here as the password
# Registry Settings
export IMAGE_VERSION=v0.0.1
export IMAGE_URL=registry.gitlab.com/laravel-in-kubernetes/laravel-app
# Login to Docker Registry
docker login ${REGISTRY_URL} -u ${REGISTRY_USER} -p ${REGISTRY_PASS}
# Build Images
docker build . -t ${IMAGE_URL}/cli:${IMAGE_VERSION} --target cli
docker build . -t ${IMAGE_URL}/cron:${IMAGE_VERSION} --target cron
docker build . -t ${IMAGE_URL}/fpm_server:${IMAGE_VERSION} --target fpm_server
docker build . -t ${IMAGE_URL}/web_server:${IMAGE_VERSION} --target web_server
# Push Images
docker push ${IMAGE_URL}/cli:${IMAGE_VERSION}
docker push ${IMAGE_URL}/cron:${IMAGE_VERSION}
docker push ${IMAGE_URL}/fpm_server:${IMAGE_VERSION}
docker push ${IMAGE_URL}/web_server:${IMAGE_VERSION}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment