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
7dabcc43
Commit
7dabcc43
authored
3 years ago
by
Gilles Filippini
Committed by
pini
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
feat(docker): install dex for dev and test images
parent
503bd826
No related branches found
No related tags found
1 merge request
!1397
feat(docker): build and install dex
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+3
-1
3 additions, 1 deletion
.gitlab-ci.yml
release/Makefile
+4
-1
4 additions, 1 deletion
release/Makefile
release/docker/Dockerfile
+8
-3
8 additions, 3 deletions
release/docker/Dockerfile
release/docker/dex.sh
+5
-0
5 additions, 0 deletions
release/docker/dex.sh
with
20 additions
and
5 deletions
.gitlab-ci.yml
+
3
−
1
View file @
7dabcc43
...
...
@@ -164,7 +164,7 @@ releases:x64:
-
docker info
script
:
-
docker pull $CI_REGISTRY_IMAGE:$IMAGE_TAG ||
true
-
docker build --cache-from $CI_REGISTRY_IMAGE:$IMAGE_TAG --pull -t "$CI_REGISTRY_IMAGE:$IMAGE_TAG" -f release/docker/Dockerfile .
-
docker build --cache-from $CI_REGISTRY_IMAGE:$IMAGE_TAG --pull -t "$CI_REGISTRY_IMAGE:$IMAGE_TAG"
--build-arg="INSTALL_DEX=$INSTALL_DEX"
-f release/docker/Dockerfile .
#- docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" $CI_REGISTRY
#- docker push "$CI_REGISTRY_IMAGE:$IMAGE_TAG"
# Temporary push on dockerhub
...
...
@@ -183,6 +183,7 @@ package:test:docker-test-image:
-
when
:
manual
variables
:
IMAGE_TAG
:
"
test-image"
INSTALL_DEX
:
"
yes"
package:dev:docker
:
extends
:
.docker-build-app-image
...
...
@@ -192,6 +193,7 @@ package:dev:docker:
-
if
:
$CI_COMMIT_BRANCH == "dev"
variables
:
IMAGE_TAG
:
"
dev"
INSTALL_DEX
:
"
yes"
package:prod:docker
:
stage
:
package
...
...
This diff is collapsed.
Click to expand it.
release/Makefile
+
4
−
1
View file @
7dabcc43
...
...
@@ -37,6 +37,7 @@ ARCH = $(shell uname -m | sed -e "s/86_//")
PLATFORM
=
$(
shell
uname
-s
|
tr
A-Z a-z
)
ADD_DEBUG
=
Y
DEST
=
INSTALL_DEX
=
no
# Keep all intermediate targets
.SECONDARY
:
...
...
@@ -84,9 +85,11 @@ base-gui: $(call nodedep,duniter-ui) base
# Build the base
.PHONY
:
base
base
:
install_dex=$(filter yes
,
$(INSTALL_DEX))
base
:
| node_modules
@
cargo build
--release
-p
duniter-cli
@
cargo build
--release
-p
duniter-cli
$(
if
$(
install_dex
)
,-p duniter-dbex,
)
@
mv
target/release/duniter bin/duniter
@$(
if
$(
install_dex
)
,mv target/release/dex bin/dex,:
)
index.html
:
$(call nodedep
,
duniter-ui) $(addprefix node_modules/
,
$(leveldown.COMPILED) $(sqlite3.COMPILED))
@
sed
-i
"s/
\"
main
\"
:
\"
index.js
\"
,/
\"
main
\"
:
\"
index.html
\"
,/"
package.json
...
...
This diff is collapsed.
Click to expand it.
release/docker/Dockerfile
+
8
−
3
View file @
7dabcc43
...
...
@@ -9,6 +9,7 @@ LABEL version="0.1.0"
LABEL
description="Duniter server (Crypto-currency software to manage libre currency such as Ğ1)"
ARG
DUNITER_UI_VER="1.7.x"
ARG
INSTALL_DEX="no"
RUN
apk update
&&
\
apk add ca-certificates curl
&&
\
...
...
@@ -25,8 +26,8 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
# build duniter
RUN
PATH
=
${
HOME
}
/.cargo/bin:
${
PATH
}
\
RUSTFLAGS
=
"-C target-feature=-crt-static"
\
make
-C
release
ADD_DEBUG
=
N server-gui clean
\
RUSTFLAGS
=
"-C target-feature=-crt-static
-L/usr/lib
"
\
make
-C
release
ADD_DEBUG
=
N
INSTALL_DEX
=
${
INSTALL_DEX
}
server-gui clean
\
&&
rm
-rf
work/extra
# ------------------------------------------------------------------------------
...
...
@@ -35,6 +36,8 @@ RUN PATH=${HOME}/.cargo/bin:${PATH} \
FROM
node:10-alpine
ARG
INSTALL_DEX="no"
# install jq
RUN
apk add jq
...
...
@@ -46,8 +49,10 @@ RUN mkdir -p /var/lib/duniter /etc/duniter && chown duniter:duniter /var/lib/dun
# copy the build artifact from the build stage
COPY
--from=build --chown=duniter:duniter /duniter/work /duniter
# copy
duniter
wrapper
# copy wrapper
s
COPY
release/docker/duniter.sh /usr/bin/duniter
COPY
release/docker/dex.sh /usr/bin/dex
RUN
[
"
$INSTALL_DEX
"
=
yes
]
||
rm
/usr/bin/dex
# copy entrypoint
COPY
release/docker/docker-entrypoint.sh /
...
...
This diff is collapsed.
Click to expand it.
release/docker/dex.sh
0 → 100755
+
5
−
0
View file @
7dabcc43
#!/bin/sh
if
[
"
$1
"
!=
--home
]
;
then
set
--
--home
/var/lib/duniter
"
$@
"
fi
exec
/duniter/bin/dex
"
$@
"
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