Switched to clang
parent
35f6c4acbf
commit
bba7ce98d0
11
Dockerfile
11
Dockerfile
|
@ -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 {} \;
|
||||||
|
|
||||||
|
|
Reference in New Issue