2023-06-06 16:29:40 +00:00
|
|
|
# docker build --rm -f docker/Dockerfile.make -t woodpecker/make:local .
|
2024-02-16 15:40:46 +00:00
|
|
|
FROM docker.io/golang:1.22-alpine3.18 as golang_image
|
2023-11-01 22:46:03 +00:00
|
|
|
FROM docker.io/node:21-alpine3.18
|
2022-02-10 14:12:47 +00:00
|
|
|
|
2023-11-01 22:46:03 +00:00
|
|
|
# renovate: datasource=repology depName=alpine_3_18/make versioning=loose
|
|
|
|
ENV MAKE_VERSION="4.4.1-r1"
|
|
|
|
# renovate: datasource=repology depName=alpine_3_18/gcc versioning=loose
|
2023-11-03 14:41:44 +00:00
|
|
|
ENV GCC_VERSION="12.2.1_git20220924-r10"
|
2023-11-01 22:46:03 +00:00
|
|
|
# renovate: datasource=repology depName=alpine_3_18/binutils-gold versioning=loose
|
|
|
|
ENV BINUTILS_GOLD_VERSION="2.40-r7"
|
|
|
|
# renovate: datasource=repology depName=alpine_3_18/musl-dev versioning=loose
|
|
|
|
ENV MUSL_DEV_VERSION="1.2.4-r2"
|
|
|
|
|
2023-11-03 14:41:44 +00:00
|
|
|
RUN apk add --no-cache --update make=${MAKE_VERSION} gcc=${GCC_VERSION} binutils-gold=${BINUTILS_GOLD_VERSION} musl-dev=${MUSL_DEV_VERSION} && \
|
2022-11-22 22:39:49 +00:00
|
|
|
corepack enable
|
2022-02-10 14:12:47 +00:00
|
|
|
|
|
|
|
# Build packages.
|
|
|
|
COPY --from=golang_image /usr/local/go /usr/local/go
|
2023-07-14 14:14:00 +00:00
|
|
|
COPY Makefile /
|
2022-02-10 14:12:47 +00:00
|
|
|
ENV PATH=$PATH:/usr/local/go/bin
|
|
|
|
|
2022-06-16 23:57:02 +00:00
|
|
|
# Cache tools
|
2023-06-06 16:29:40 +00:00
|
|
|
RUN make install-tools && \
|
|
|
|
mv /root/go/bin/* /usr/local/go/bin/ && \
|
|
|
|
chmod 755 /usr/local/go/bin/*
|
2022-06-16 23:57:02 +00:00
|
|
|
|
2022-02-10 14:12:47 +00:00
|
|
|
WORKDIR /build
|
2023-06-06 16:29:40 +00:00
|
|
|
RUN chmod -R 777 /root
|
2022-02-10 14:12:47 +00:00
|
|
|
|
2023-06-06 16:29:40 +00:00
|
|
|
CMD [ "/bin/sh" ]
|