mirror of
https://github.com/hugomods/docker.git
synced 2025-04-26 05:00:50 +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; \
|
||||
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
|
||||
|
||||
COPY --from=gobuild /usr/bin/hugo /usr/bin/hugo
|
||||
|
|
|
@ -3,7 +3,7 @@ INCLUDE ./Dockerfile-builder
|
|||
|
||||
FROM node:alpine AS node
|
||||
|
||||
FROM alpine:edge
|
||||
FROM alpine
|
||||
|
||||
INCLUDE ./snippets/node
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# syntax = devthefuture/dockerfile-x
|
||||
INCLUDE ./Dockerfile-builder
|
||||
|
||||
FROM alpine:edge
|
||||
FROM alpine
|
||||
|
||||
INCLUDE ./snippets/common
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# syntax = devthefuture/dockerfile-x
|
||||
INCLUDE ./Dockerfile-builder
|
||||
|
||||
FROM alpine:edge
|
||||
FROM alpine
|
||||
|
||||
INCLUDE ./snippets/common
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# syntax = devthefuture/dockerfile-x
|
||||
INCLUDE ./Dockerfile-builder
|
||||
|
||||
FROM alpine:edge
|
||||
FROM alpine
|
||||
|
||||
INCLUDE ./snippets/common
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# syntax = devthefuture/dockerfile-x
|
||||
INCLUDE ./Dockerfile-builder
|
||||
|
||||
FROM alpine:edge
|
||||
FROM alpine
|
||||
|
||||
INCLUDE ./snippets/common
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ INCLUDE ./Dockerfile-builder
|
|||
|
||||
FROM node:alpine AS node
|
||||
|
||||
FROM alpine:edge
|
||||
FROM alpine
|
||||
|
||||
INCLUDE ./snippets/node
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ INCLUDE ./Dockerfile-builder
|
|||
|
||||
FROM node:alpine AS node
|
||||
|
||||
FROM alpine:edge
|
||||
FROM alpine
|
||||
|
||||
INCLUDE ./snippets/node
|
||||
|
||||
|
|
|
@ -10,3 +10,6 @@ RUN gem install html-proofer --bindir /usr/local/bin
|
|||
|
||||
# clean up
|
||||
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.
|
||||
RUN apk add dart-sass --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/
|
||||
RUN apk add --no-cache dart-sass
|
||||
COPY --from=dart-sass /opt/dart-sass /opt/dart-sass
|
||||
ENV PATH="$PATH:/opt/dart-sass"
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
FROM node:alpine as node
|
||||
|
||||
FROM alpine:edge
|
||||
FROM alpine
|
||||
|
||||
COPY --from=node /usr/lib /usr/lib
|
||||
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
|
||||
INCLUDE ./node
|
||||
|
||||
# install extra Markdown handlers
|
||||
RUN apk add --no-cache \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue