Skip to content
Snippets Groups Projects
Commit 373fabbc authored by Peter Dave Hello's avatar Peter Dave Hello
Browse files

Refactor Dockerfile, separate and move `apk add` upper

This will allow Docker to cache the pacakges apk added, which saves the
bandwidth and time to build this Docker image.
parent 104dc95b
No related branches found
No related tags found
No related merge requests found
......@@ -2,11 +2,12 @@ FROM nimlang/nim:1.2.8-alpine as nim
MAINTAINER setenforce@protonmail.com
EXPOSE 8080
RUN apk --no-cache add libsass-dev libffi-dev openssl-dev redis
COPY . /src/nitter
WORKDIR /src/nitter
RUN apk --no-cache add libsass-dev libffi-dev openssl-dev redis \
&& nimble build -y -d:release --passC:"-flto" --passL:"-flto" \
RUN nimble build -y -d:release --passC:"-flto" --passL:"-flto" \
&& strip -s nitter \
&& nimble scss
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment