Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duniter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
typescript
duniter
Commits
8b3dc7c9
Commit
8b3dc7c9
authored
2 years ago
by
aynic.os
Browse files
Options
Downloads
Patches
Plain Diff
add armv7l docker support
parent
3f33a114
No related branches found
No related tags found
1 merge request
!1409
release/1.9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
docker/docker-compose.yml
+4
-0
4 additions, 0 deletions
docker/docker-compose.yml
docker/duniter/Dockerfile
+26
-22
26 additions, 22 deletions
docker/duniter/Dockerfile
with
30 additions
and
22 deletions
docker/docker-compose.yml
+
4
−
0
View file @
8b3dc7c9
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
docker/duniter/Dockerfile
+
26
−
22
View file @
8b3dc7c9
...
...
@@ -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"]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment