forked from klakegg/docker-hugo
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch from dart-sass-embedded to dart-sass (#181)
This should fix the sass version and also will update the already present dart-sass-embedded version - #178
- Loading branch information
Showing
13 changed files
with
54 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
# Create a custom user with UID 1234 and GID 1234 | ||
RUN getent group hugo 2>&1 > /dev/null || groupadd -g 1234 hugo && \ | ||
getent passwd hugo 2>&1 > /dev/null || useradd -m -u 1234 -g hugo hugo | ||
getent passwd hugo 2>&1 > /dev/null || useradd -m -u 1234 -g hugo hugo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
RUN getent group hugo 2>&1 > /dev/null || addgroup -g 1234 hugo \ | ||
&& getent passwd hugo 2>&1 > /dev/null || adduser -u 1234 -D -H -G hugo -g "" hugo | ||
&& getent passwd hugo 2>&1 > /dev/null || adduser -u 1234 -D -H -G hugo -g "" hugo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/sh | ||
|
||
# This file is triggered inside the _base/Dockerfile-base file. | ||
|
||
set -e | ||
set -u | ||
|
||
# Variables | ||
SASS_VERSION="1.81.0" | ||
|
||
# Architecture | ||
TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64} | ||
|
||
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then | ||
ARCH="x64" | ||
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then | ||
ARCH="arm64" | ||
else | ||
echo "Unknown build architecture: $TARGETPLATFORM" | ||
exit 2 | ||
fi | ||
|
||
# Download | ||
wget https://github.com/sass/dart-sass/releases/download/${SASS_VERSION}/dart-sass-${SASS_VERSION}-linux-${ARCH}.tar.gz \ | ||
-O /sass.tar.gz | ||
|
||
# Unpack | ||
mkdir -p /files/usr/local/lib /files/usr/local/bin | ||
tar -zxvf sass.tar.gz -C /files/usr/local/lib | ||
|
||
# Create symlink | ||
ln -s /usr/local/lib/dart-sass/sass /files/usr/local/bin/sass | ||
|
||
# Create alias for saas --embedded | ||
mkdir -p /files/etc/profile.d /files/home/hugo | ||
echo 'alias dart-sass-embedded="sass --embedded"' > /files/etc/profile.d/dart-sass-embedded.sh | ||
echo 'alias dart-sass-embedded="sass --embedded"' > /files/home/hugo/.bash_aliases | ||
|
||
# Make script executable | ||
chmod a+x /files/etc/profile.d/dart-sass-embedded.sh |