Skip to content
Snippets Groups Projects
Commit 8b3dc7c9 authored by aynic.os's avatar aynic.os
Browse files

add armv7l docker support

parent 3f33a114
No related branches found
No related tags found
1 merge request!1409release/1.9
......@@ -36,6 +36,10 @@ services:
- DUNITER_WS2P_REMOTE_HOST=${DUNITER_WS2P_REMOTE_HOST:-duniter.localhost}
- DUNITER_WS2P_REMOTE_PATH=${DUNITER_WS2P_REMOTE_PATH:-ws2p}
- DUNITER_WS2P_REMOTE_PORT=${DUNITER_WS2P_REMOTE_PORT:-443}
healthcheck:
test: "code=$$(echo -e 'GET / HTTP/1.0\n' |nc -w 1 localhost 10901 | awk 'NR == 1 {print $$2}') && [ \"$$code\" = \"200\" ] && echo \"OK\" || exit 1"
timeout: 3s
retries: 0
image: ${DOCKER_REPOSITORY:-duniter}/duniter:${DOCKER_IMAGE_TAG:-latest}
networks:
- private
......
......@@ -2,24 +2,25 @@
# Build Stage
# ------------------------------------------------------------------------------
FROM node:10-alpine as build
FROM alpine:latest as build
LABEL maintainer="elois <elois@duniter.org>"
LABEL version="0.1.0"
LABEL description="Duniter server (Crypto-currency software to manage libre currency such as Ğ1)"
LABEL description Duniter server (Crypto-currency software to manage libre currency such as Ğ1)
LABEL maintainer aynic.os <support+docker@asycn.io>
LABEL version 0.1.1
ARG DUNITER_UI_VER="1.7.x"
ARG INSTALL_DEX="no"
RUN apk update && \
apk add ca-certificates curl && \
update-ca-certificates && \
apk add --update cmake g++ python make
# install node, npm and yarn
COPY --from=node:10-alpine /usr/local/bin/ /usr/local/bin/
COPY --from=node:10-alpine /usr/local/lib/node_modules/ /usr/local/lib/node_modules/
COPY --from=node:10-alpine /opt/ /opt/
WORKDIR /duniter
# install rust from repository as armv7 is not supported by `curl https://sh.rustup.rs -sSf | sh -s -- -y`
# rustup: installer for platform 'armv7-unknown-linux-musleabihf' not found, this may be unsupported
RUN apk add cmake g++ make python3 rust cargo
# install latest stable rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
WORKDIR /duniter
# copy source tree
COPY Cargo.* LICENSE *.json *.md *.toml *.ts *.txt ./
......@@ -44,18 +45,23 @@ RUN PATH=${HOME}/.cargo/bin:${PATH} \
# Final Stage
# ------------------------------------------------------------------------------
FROM node:10-alpine
FROM alpine:latest
ARG DOCKER_BUILD_DIR=docker/duniter
ARG INSTALL_DEX="no"
# install node, npm and yarn
COPY --from=node:10-alpine /usr/local/bin/ /usr/local/bin/
COPY --from=node:10-alpine /usr/local/lib/node_modules/ /usr/local/lib/node_modules/
COPY --from=node:10-alpine /opt/ /opt/
# install jq
RUN apk add jq
RUN apk add jq libstdc++
# create group and user duniter
RUN addgroup -S -g 1111 duniter && \
adduser -SD -h /duniter -G duniter -u 1111 duniter
RUN mkdir -p /var/lib/duniter /etc/duniter && chown duniter:duniter /var/lib/duniter /etc/duniter
RUN addgroup -S -g 1111 duniter \
&& adduser -SD -h /duniter -G duniter -u 1111 duniter \
&& mkdir -p /var/lib/duniter /etc/duniter && chown duniter:duniter /var/lib/duniter /etc/duniter
# copy the build artifact from the build stage
COPY --from=build --chown=duniter:duniter /duniter/work /duniter
......@@ -79,7 +85,5 @@ EXPOSE 9220 10901 20901 30901
USER duniter
WORKDIR /var/lib/duniter
ENTRYPOINT ["/docker-entrypoint.sh"]
HEALTHCHECK CMD code=$(echo -e 'GET / HTTP/1.0\n' |nc -w 1 localhost 10901 | awk 'NR == 1 {print $2}') \
&& [ "$code" = "200" ] && echo "OK" || exit 1
CMD []
ENTRYPOINT ["/docker-entrypoint.sh"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment