mirror of
https://github.com/hugomods/docker.git
synced 2025-04-26 13:10:48 +03:00
fix: use prebuilt Dart Sass instead, to avoid using the alpine:edge image [build] (#112)
This commit is contained in:
parent
d6afc555a1
commit
796fb87fbc
11 changed files with 24 additions and 15 deletions
|
@ -37,6 +37,16 @@ RUN --mount=type=cache,target=/go/pkg \
|
||||||
xx-go build -ldflags="$LDFLAGS" -tags $BUILD_TAGS -o /usr/bin/hugo; \
|
xx-go build -ldflags="$LDFLAGS" -tags $BUILD_TAGS -o /usr/bin/hugo; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
FROM alpine as dart-sass
|
||||||
|
|
||||||
|
ARG TARGETARCH
|
||||||
|
|
||||||
|
RUN apk add jq curl
|
||||||
|
RUN curl -s https://api.github.com/repos/sass/dart-sass/releases/latest | \
|
||||||
|
jq -r --arg REGEXP "^.+-linux-${TARGETARCH/amd64/x64}-musl.tar.gz$" '.assets[].browser_download_url | match($REGEXP) | .string' | \
|
||||||
|
xargs -n1 curl -L -o dart-sass.tar.gz
|
||||||
|
RUN tar -C /opt -xzf dart-sass.tar.gz
|
||||||
|
|
||||||
FROM golang:alpine as builder
|
FROM golang:alpine as builder
|
||||||
|
|
||||||
COPY --from=gobuild /usr/bin/hugo /usr/bin/hugo
|
COPY --from=gobuild /usr/bin/hugo /usr/bin/hugo
|
||||||
|
|
|
@ -3,7 +3,7 @@ INCLUDE ./Dockerfile-builder
|
||||||
|
|
||||||
FROM node:alpine AS node
|
FROM node:alpine AS node
|
||||||
|
|
||||||
FROM alpine:edge
|
FROM alpine
|
||||||
|
|
||||||
INCLUDE ./snippets/node
|
INCLUDE ./snippets/node
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# syntax = devthefuture/dockerfile-x
|
# syntax = devthefuture/dockerfile-x
|
||||||
INCLUDE ./Dockerfile-builder
|
INCLUDE ./Dockerfile-builder
|
||||||
|
|
||||||
FROM alpine:edge
|
FROM alpine
|
||||||
|
|
||||||
INCLUDE ./snippets/common
|
INCLUDE ./snippets/common
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# syntax = devthefuture/dockerfile-x
|
# syntax = devthefuture/dockerfile-x
|
||||||
INCLUDE ./Dockerfile-builder
|
INCLUDE ./Dockerfile-builder
|
||||||
|
|
||||||
FROM alpine:edge
|
FROM alpine
|
||||||
|
|
||||||
INCLUDE ./snippets/common
|
INCLUDE ./snippets/common
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# syntax = devthefuture/dockerfile-x
|
# syntax = devthefuture/dockerfile-x
|
||||||
INCLUDE ./Dockerfile-builder
|
INCLUDE ./Dockerfile-builder
|
||||||
|
|
||||||
FROM alpine:edge
|
FROM alpine
|
||||||
|
|
||||||
INCLUDE ./snippets/common
|
INCLUDE ./snippets/common
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# syntax = devthefuture/dockerfile-x
|
# syntax = devthefuture/dockerfile-x
|
||||||
INCLUDE ./Dockerfile-builder
|
INCLUDE ./Dockerfile-builder
|
||||||
|
|
||||||
FROM alpine:edge
|
FROM alpine
|
||||||
|
|
||||||
INCLUDE ./snippets/common
|
INCLUDE ./snippets/common
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ INCLUDE ./Dockerfile-builder
|
||||||
|
|
||||||
FROM node:alpine AS node
|
FROM node:alpine AS node
|
||||||
|
|
||||||
FROM alpine:edge
|
FROM alpine
|
||||||
|
|
||||||
INCLUDE ./snippets/node
|
INCLUDE ./snippets/node
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ INCLUDE ./Dockerfile-builder
|
||||||
|
|
||||||
FROM node:alpine AS node
|
FROM node:alpine AS node
|
||||||
|
|
||||||
FROM alpine:edge
|
FROM alpine
|
||||||
|
|
||||||
INCLUDE ./snippets/node
|
INCLUDE ./snippets/node
|
||||||
|
|
||||||
|
|
|
@ -10,3 +10,6 @@ RUN gem install html-proofer --bindir /usr/local/bin
|
||||||
|
|
||||||
# clean up
|
# clean up
|
||||||
RUN apk --purge del build-base make ruby-dev
|
RUN apk --purge del build-base make ruby-dev
|
||||||
|
|
||||||
|
# require by Node.js
|
||||||
|
RUN apk add --no-cache libstdc++
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
# install Embedded Dart SASS.
|
COPY --from=dart-sass /opt/dart-sass /opt/dart-sass
|
||||||
RUN apk add dart-sass --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/
|
ENV PATH="$PATH:/opt/dart-sass"
|
||||||
RUN apk add --no-cache dart-sass
|
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
FROM node:alpine as node
|
FROM node:alpine as node
|
||||||
|
|
||||||
FROM alpine:edge
|
FROM alpine
|
||||||
|
|
||||||
COPY --from=node /usr/lib /usr/lib
|
INCLUDE ./node
|
||||||
COPY --from=node /usr/local/lib /usr/local/lib
|
|
||||||
COPY --from=node /usr/local/include /usr/local/include
|
|
||||||
COPY --from=node /usr/local/bin /usr/local/bin
|
|
||||||
|
|
||||||
# install extra Markdown handlers
|
# install extra Markdown handlers
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue