Skip to content
Snippets Groups Projects
Commit 122a95d4 authored by Stéphane Veyret's avatar Stéphane Veyret Committed by Éloïs
Browse files

Use Makefile in Dockerfile

parent 78eca00b
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,8 @@ RUN apk update && \ ...@@ -15,6 +15,8 @@ RUN apk update && \
update-ca-certificates && \ update-ca-certificates && \
apk add --update python make g++ apk add --update python make g++
WORKDIR /duniter
# copy source tree # copy source tree
COPY ./ ./ COPY ./ ./
...@@ -22,15 +24,10 @@ COPY ./ ./ ...@@ -22,15 +24,10 @@ COPY ./ ./
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
# build duniter # build duniter
RUN export PATH="$HOME/.cargo/bin:$PATH" && \ RUN PATH=${HOME}/.cargo/bin:${PATH} \
export RUSTFLAGS="-C target-feature=-crt-static" && \ RUSTFLAGS="-C target-feature=-crt-static" \
export NEON_BUILD_RELEASE="true" && \ make -C release ADD_DEBUG=N server-gui clean \
npm add duniter-ui@${DUNITER_UI_VER} && \ && mv release/docker/duniter.sh work/docker.sh
npm i && npm prune --production && \
mv release/docker/duniter.sh docker.sh && \
rm -rf coverage release test && \
rm -rf target && \
rm -rf neon/native/target
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Final Stage # Final Stage
...@@ -44,7 +41,7 @@ RUN addgroup -S -g 1111 duniter && \ ...@@ -44,7 +41,7 @@ RUN addgroup -S -g 1111 duniter && \
RUN mkdir -p /var/lib/duniter /etc/duniter && chown duniter:duniter /var/lib/duniter /etc/duniter RUN mkdir -p /var/lib/duniter /etc/duniter && chown duniter:duniter /var/lib/duniter /etc/duniter
# copy the build artifact from the build stage # copy the build artifact from the build stage
COPY --from=build --chown=duniter:duniter . /duniter/duniter COPY --from=build --chown=duniter:duniter /duniter/work /duniter/duniter
# copy bootstrap script # copy bootstrap script
RUN cp /duniter/duniter/docker.sh /usr/bin/duniter && \ RUN cp /duniter/duniter/docker.sh /usr/bin/duniter && \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment