From 258bf0bea2aac51aaf7bbfef36a505b8264f1d24 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Sat, 25 Feb 2023 18:33:40 +0100 Subject: [PATCH] Use self hosted image --- Dockerfile | 1 - .../index.md | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 43bbe70..b44be04 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,4 +2,3 @@ FROM klakegg/hugo WORKDIR /src COPY . /src RUN hugo - diff --git a/content/posts/argocd-dynamic-environment-per-branch-part-1/index.md b/content/posts/argocd-dynamic-environment-per-branch-part-1/index.md index 89b3c35..cafba77 100644 --- a/content/posts/argocd-dynamic-environment-per-branch-part-1/index.md +++ b/content/posts/argocd-dynamic-environment-per-branch-part-1/index.md @@ -182,4 +182,20 @@ Now I need to push a new image on each commit instead of pushing only once the c tags: ${DRONE_COMMIT_SHA} ``` -Now if my code is not really broken, I'll have an image for each commit. And when I merge my branch to `main` I can use a tag from the latest preview build on for the production instance. So I'm almost sure that what I've tested before is what a visitor will see. \ No newline at end of file +Now if my code is not really broken, I'll have an image for each commit. And when I merge my branch to `main` I can use a tag from the latest preview build on for the production instance. So I'm almost sure that what I've tested before is what a visitor will see. + +> But with this kind of setup I've reached docker pull limit pretty fast, so I've decided that I need to have a builder image in my registry too. Of course, it must be an automated action, but right off the bat, I've just pushed the `hugo` image to my registry with the `latest` tag and created an issue to fix it later + +```BASH +docker pull klakegg/hugo +docker tag klakegg/hugo git.badhouseplants.net/badhouseplants/hugo-builder +docker push +``` + +And update my Dockerfile to look like this: +```DOCKERFILE +FROM git.badhouseplants.net/badhouseplants/hugo-builder +WORKDIR /src +COPY . /src +RUN hugo +``` \ No newline at end of file