Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
py-g1-migrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
tools
py-g1-migrator
Commits
e1441cb1
Commit
e1441cb1
authored
1 year ago
by
Cédric Moreau
Browse files
Options
Downloads
Patches
Plain Diff
fix: Dockerfile
parent
61a10bf8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docker/Dockerfile
+53
-0
53 additions, 0 deletions
docker/Dockerfile
with
53 additions
and
0 deletions
docker/Dockerfile
0 → 100644
+
53
−
0
View file @
e1441cb1
FROM
rust:1-bullseye
as
build_dex
RUN
apt-get update
&&
\
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-y
clang cmake protobuf-compiler
WORKDIR
/
RUN
git clone https://git.duniter.org/nodes/typescript/duniter.git
\
--branch
duniter-v2s-issue-123-industrialize-releases
\
duniter
WORKDIR
/duniter/rust-bins/duniter-dbex
RUN
cargo build
--release
FROM
python:3.9.18-bullseye
as
build_g1_output
WORKDIR
/app
COPY
--from=build_dex /duniter/target/release/dex ./
RUN
apt-get update
&&
\
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-y
sqlite3
WORKDIR
/dump
RUN
curl https://dl.cgeek.fr/public/backup-g1-duniter-1.8.6.tgz
-o
g1-dump.tgz
\
&&
tar
xvzf g1-dump.tgz
\
&&
rm
g1-dump.tgz
\
&&
mv
backup-g1-duniter-1.8.6 duniter_default
WORKDIR
/py-g1-migrator
COPY
. .
RUN
rm
-rf
inputs/
*
RUN
rm
-rf
output/
*
ARG
dex=/app/dex
ARG
dest_folder=/py-g1-migrator
ARG
path=/dump
RUN
mkdir
-p
"
$dest_folder
/inputs"
RUN
echo
"Export wallets data in progress..."
RUN
yes
|
$dex
-h
"
$path
"
find wallet
-p
balance
-o
json
-f
"
$dest_folder
/inputs/wallets.json"
>
/dev/null
RUN
echo
"Export certs data in progress..."
RUN
yes
|
$dex
-h
"
$path
"
find cindex
-p
issued
-o
json
-f
"
$dest_folder
/inputs/certs.json"
>
/dev/null
RUN
echo
"Export identities data in progress..."
RUN
yes
|
$dex
-h
"
$path
"
find iindex
-p
uid member writtenOn
-o
json
-f
"
$dest_folder
/inputs/idty.json"
>
/dev/null
RUN
echo
"Export blocs dates data in progress..."
RUN
yes
|
$dex
-h
"
$path
"
find main_blocks
-p
medianTime
-o
json
-f
"
$dest_folder
/inputs/blocs.json"
>
/dev/null
RUN
echo
"Export UD value in progress..."
RUN
yes
|
$dex
-h
"
$path
"
find bindex
-r
-l
1
-p
dividend
-o
json
-f
"
$dest_folder
/inputs/ud_value.json"
>
/dev/null
RUN
echo
"Export transaction history in progress..."
RUN
sqlite3
"
$path
/duniter_default/txs.db"
--json
"select time,comment,issuers,outputs from txs;"
>
"
$dest_folder
/inputs/transactions_history.json"
&&
echo
Done
RUN
pip
install
-r
requirements.txt
RUN
./main.py
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