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

View File

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