problem was on self hosted runner
slef hosted runner on dev.ahmza.com was not properly configured with qemu to build multi arch images. Should work now
This commit is contained in:
+8
-13
@@ -1,21 +1,16 @@
|
||||
# use the classic alpine image
|
||||
#FROM alpine as Builder
|
||||
FROM golang:1.22.5-alpine as Builder
|
||||
FROM golang:1.22.5-alpine AS build
|
||||
ARG GITLAB_TOKEN
|
||||
|
||||
# install curl and git
|
||||
# RUN apk add --update curl git
|
||||
RUN apk add git build-base
|
||||
RUN apk add --update curl git
|
||||
|
||||
# download and unnzip the hugo binary then place it in /usr/local/bin
|
||||
#RUN curl -L https://github.com/gohugoio/hugo/releases/download/v0.121.1/hugo_0.121.1_linux-arm64.tar.gz > hugo.tar.gz && tar -zxf hugo.tar.gz && mv hugo /usr/local/bin
|
||||
RUN CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.128.2
|
||||
# download and unnzip the hugo binary
|
||||
RUN curl -L https://github.com/gohugoio/hugo/releases/download/v0.128.2/hugo_0.128.2_linux-arm64.tar.gz > hugo.tar.gz && tar -zxf hugo.tar.gz && mv hugo /usr/local/bin
|
||||
|
||||
# clone the blog repository as well as the theme submodule
|
||||
# RUN git clone --recurse-submodules https://oauth2:$GITLAB_TOKEN@gitlab.com/AHMZA/blog.git
|
||||
# clone the blog repository
|
||||
RUN git clone https://oauth2:$GITLAB_TOKEN@gitlab.com/AHMZA/blog.git
|
||||
|
||||
# set blog (the folder we just cloned) as the current DIR
|
||||
# set blog (folder we just cloned) as the current DIR
|
||||
WORKDIR blog
|
||||
|
||||
# run hugo --minify to generate static files
|
||||
@@ -26,10 +21,10 @@ RUN hugo --minify --gc
|
||||
FROM nginx
|
||||
|
||||
# copy the nginx.conf file
|
||||
COPY --from=Builder /blog/nginx.conf /etc/nginx/nginx.conf
|
||||
COPY --from=build /go/blog/nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
# copy the static files
|
||||
COPY --from=Builder /blog/public/ /usr/share/nginx/html
|
||||
COPY --from=build /go/blog/public/ /usr/share/nginx/html
|
||||
|
||||
# Tell the image to expose port 80 for HTTP, SSL provided by reverse proxy.
|
||||
EXPOSE 80
|
||||
|
||||
Reference in New Issue
Block a user