mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-23 10:21:00 +00:00
669abdf690
Running `make in_docker ...` on a fresh system failed: ``` => CACHED [stage-1 3/6] COPY --from=golang_image /usr/local/go /usr/local/go 0.0s => ERROR [stage-1 4/6] RUN make install-tools && mv /root/go/bin/* /usr/local/go/bin/ && chmod 755 /usr/local/go/bin/* 0.1s ------ > [stage-1 4/6] RUN make install-tools && mv /root/go/bin/* /usr/local/go/bin/ && chmod 755 /usr/local/go/bin/*: 0.132 make: *** No rule to make target 'install-tools'. Stop. ------ Dockerfile.make:14 -------------------- 13 | # Cache tools 14 | >>> RUN make install-tools && \ 15 | >>> mv /root/go/bin/* /usr/local/go/bin/ && \ 16 | >>> chmod 755 /usr/local/go/bin/* 17 | -------------------- ``` Fixed after adding the Makefile to the make container.
21 lines
520 B
Makefile
21 lines
520 B
Makefile
# docker build --rm -f docker/Dockerfile.make -t woodpecker/make:local .
|
|
FROM golang:1.20-alpine as golang_image
|
|
FROM node:18-alpine
|
|
|
|
RUN apk add --no-cache --update make gcc binutils-gold musl-dev && \
|
|
corepack enable
|
|
|
|
# Build packages.
|
|
COPY --from=golang_image /usr/local/go /usr/local/go
|
|
COPY Makefile /
|
|
ENV PATH=$PATH:/usr/local/go/bin
|
|
|
|
# Cache tools
|
|
RUN make install-tools && \
|
|
mv /root/go/bin/* /usr/local/go/bin/ && \
|
|
chmod 755 /usr/local/go/bin/*
|
|
|
|
WORKDIR /build
|
|
RUN chmod -R 777 /root
|
|
|
|
CMD [ "/bin/sh" ]
|