wanderer
8a1821c416
All checks were successful
continuous-integration/drone/push Build is passing
update hadolint to v2.6.0-alpine and add an IGNORE to Dockerfile to make sure the linter is up to date and all errors are resolved, resulting ina passing build. the ignore is added as the issue is not too big of a deal (at least not ATM). * 55d9852 - fix: make hadolint pass <surtur> * 8f2e192 - about, posts: add dnscrypt <surtur> Co-authored-by: surtur <a_mirre@utb.cz> Reviewed-on: #29 Co-authored-by: wanderer <wanderer@noreply.git.dotya.ml> Co-committed-by: wanderer <wanderer@noreply.git.dotya.ml>
29 lines
855 B
Docker
29 lines
855 B
Docker
FROM immawanderer/fedora-hugo:latest AS hugobuild
|
|
RUN mkdir -pv /homepage
|
|
COPY . /homepage
|
|
|
|
WORKDIR /homepage
|
|
|
|
RUN git submodule init \
|
|
&& git submodule update --recursive \
|
|
&& hugo version
|
|
# "DL3059 info: Multiple consecutive `RUN` instructions.
|
|
# Consider consolidation."
|
|
# hadolint ignore=DL3059
|
|
RUN hugo --minify --gc=true
|
|
|
|
WORKDIR /
|
|
|
|
FROM nginx:mainline-alpine
|
|
COPY --from=hugobuild /homepage/public/ /usr/share/nginx/html
|
|
|
|
# tripple slash reference
|
|
# https://stackoverflow.com/questions/5190966/using-sed-to-insert-tabs/5191165#5191165
|
|
RUN sed -i -e 's/^worker_processes auto;/worker_processes auto;/'\
|
|
-e "/^events {$/ a \\\tmulti_accept on;\n\tuse epoll;"\
|
|
-e "/^http {$/ a \\\tserver_tokens off;\n\tetag off;\n"\
|
|
-e 's/#tcp_nopush/tcp_nopush/'\
|
|
-e "/tcp_nopush/ a \\\ttcp_nodelay on;"\
|
|
-e "s/^ */$(printf '\t')/"\
|
|
/etc/nginx/nginx.conf
|