2024-12-17 21:35:30 +02:00
|
|
|
# docker build --rm -f docker/Dockerfile.make -t woodpecker/make:local .
|
|
|
|
FROM docker.io/golang:1.23-alpine AS golang_image
|
2024-10-30 15:21:50 +02:00
|
|
|
FROM docker.io/node:23-alpine
|
2022-02-10 16:12:47 +02:00
|
|
|
|
2024-10-30 15:21:50 +02:00
|
|
|
RUN apk add --no-cache --update make gcc binutils-gold musl-dev protoc && \
|
2022-11-23 00:39:49 +02:00
|
|
|
corepack enable
|
2022-02-10 16:12:47 +02:00
|
|
|
|
|
|
|
# Build packages.
|
|
|
|
COPY --from=golang_image /usr/local/go /usr/local/go
|
2023-07-14 16:14:00 +02:00
|
|
|
COPY Makefile /
|
2022-02-10 16:12:47 +02:00
|
|
|
ENV PATH=$PATH:/usr/local/go/bin
|
2024-04-26 07:51:10 +02:00
|
|
|
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
2024-12-17 21:35:30 +02:00
|
|
|
ENV COREPACK_ENABLE_AUTO_PIN=0
|
2022-02-10 16:12:47 +02:00
|
|
|
|
2022-06-17 01:57:02 +02:00
|
|
|
# Cache tools
|
2024-04-15 17:46:44 +02:00
|
|
|
RUN GOBIN=/usr/local/go/bin make install-tools && \
|
|
|
|
rm -rf /Makefile
|
|
|
|
|
|
|
|
ENV GOPATH=/tmp/go
|
|
|
|
ENV HOME=/tmp/home
|
|
|
|
ENV PATH=$PATH:/usr/local/go/bin:/tmp/go/bin
|
2022-06-17 01:57:02 +02:00
|
|
|
|
2022-02-10 16:12:47 +02:00
|
|
|
WORKDIR /build
|
2023-06-06 18:29:40 +02:00
|
|
|
RUN chmod -R 777 /root
|
2022-02-10 16:12:47 +02:00
|
|
|
|
2023-06-06 18:29:40 +02:00
|
|
|
CMD [ "/bin/sh" ]
|