Use self hosted image

This commit is contained in:
Nikolai Rodionov 2023-02-25 18:33:40 +01:00
parent 06e8270e35
commit 258bf0bea2
2 changed files with 17 additions and 2 deletions

View File

@ -2,4 +2,3 @@ FROM klakegg/hugo
WORKDIR /src
COPY . /src
RUN hugo

View File

@ -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.
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
```