Switched to clang

master
Jef Roosens 2021-07-21 15:56:33 +02:00
parent 35f6c4acbf
commit bba7ce98d0
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
2 changed files with 7 additions and 6 deletions

View File

@ -12,13 +12,13 @@ ARG DI_VER
# Install build dependencies
# bash: required for dumb-init's Makefile
# gcc, musl-dev: compilation
# clang, build-base: compilation (I just like clang)
# curl: downloading the tarballs
# hugo: generating the static files
RUN apk add --update --no-cache \
bash \
make \
gcc \
build-base \
clang \
curl \
hugo \
musl-dev
@ -27,7 +27,7 @@ RUN apk add --update --no-cache \
RUN curl -sSL "https://www.acme.com/software/thttpd/thttpd-$THTTPD_VER.tar.gz" | \
tar xzf - && \
cd "thttpd-$THTTPD_VER" && \
./configure && \
CC=clang ./configure && \
make CCOPT="-O3 -s -static" -j$(nproc)
# Build dumb-init
@ -35,7 +35,7 @@ RUN curl -sSL "https://www.acme.com/software/thttpd/thttpd-$THTTPD_VER.tar.gz" |
RUN curl -sSL "https://github.com/Yelp/dumb-init/archive/refs/tags/v$DI_VER.tar.gz" | \
tar xzf - && \
cd "dumb-init-$DI_VER" && \
make build
CC=clang make build
# =====BUILD BLOG=====
@ -45,6 +45,7 @@ WORKDIR /usr/src/app
COPY . ./
# Generate the site
# The find command fixes file permissions, because thttpd thinks executables should be CGI files
RUN hugo --minify && \
find public -type f -exec chmod 644 {} \;

View File

@ -17,7 +17,7 @@ image:
publish:
@ docker buildx build . \
--platform linux/amd64,linux/arm64 \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
-t ${DOCKER_TAG} \
--pull \
--push