From 1f669dd27eef30124bb3e02b9cafa8d269111091 Mon Sep 17 00:00:00 2001 From: zontreck Date: Sun, 9 Feb 2025 18:09:57 -0700 Subject: [PATCH] Add a bitcoin container --- Jenkinsfile | 34 +++++++++++++++++++++++++++++++++- bitcoin/Dockerfile | 31 +++++++++++++++++++++++++++++++ bitcoin/entrypoint.sh | 3 +++ build.sh | 7 ++++++- 4 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 bitcoin/Dockerfile create mode 100644 bitcoin/entrypoint.sh diff --git a/Jenkinsfile b/Jenkinsfile index 3554787..8c23810 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -242,13 +242,45 @@ pipeline { } } + stage("Build Blockchains") { + agent { + label 'linux' + } + + steps { + script { + sh ''' + #!/bin/bash + + docker build -t git.zontreck.com/zontreck/bitcoin:latest bitcoin + ''' + } + } + } + + stage("Push Blockchains") { + agent { + label 'linux' + } + + steps { + script { + sh ''' + #!/bin/bash + + docker push git.zontreck.com/zontreck/bitcoin:latest + ''' + } + } + } + stage("Cleanup") { agent { label 'dockermain' } steps { - deleteDir() + cleanWs() } } } diff --git a/bitcoin/Dockerfile b/bitcoin/Dockerfile new file mode 100644 index 0000000..521557d --- /dev/null +++ b/bitcoin/Dockerfile @@ -0,0 +1,31 @@ +FROM git.zontreck.com/ariascreations/buildenvironments:debianbuild AS BUILDER + +WORKDIR / +RUN git clone https://github.com/bitcoin/bitcoin + +WORKDIR /bitcoin + +RUN mkdir build +WORKDIR /bitcoin/build + +RUN cmake .. +RUN make -j$(nproc) + + +FROM git.zontreck.com/ariascreations/buildenvironments:debianbuild + +WORKDIR /app +COPY --from=BUILDER /bitcoin/build/src/bitcoind ./bitcoind + +WORKDIR / +ADD ./entrypoint.sh / +RUN chmod +x entrypoint.sh + +ENV TXINDEX 0 +ENV PRUNE 953 + +EXPOSE 8333 + +RUN chmod +x /entrypoint.sh + +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] \ No newline at end of file diff --git a/bitcoin/entrypoint.sh b/bitcoin/entrypoint.sh new file mode 100644 index 0000000..74a0a24 --- /dev/null +++ b/bitcoin/entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +/app/bitcoind -datadir=/data -server=1 -txindex=$TXINDEX -prune=$PRUNE \ No newline at end of file diff --git a/build.sh b/build.sh index bf501f3..afad4f4 100755 --- a/build.sh +++ b/build.sh @@ -37,4 +37,9 @@ docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_dotnet steamcmd/d docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_proton steamcmd/proton docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_proton8 steamcmd/proton_8 docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_sniper steamcmd/sniper -docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_ubuntu steamcmd/ubuntu \ No newline at end of file +docker build -t git.zontreck.com/ariascreations/yolks:steamcmd_ubuntu steamcmd/ubuntu + + +# Bitcoin + +docker build -t git.zontreck.com/zontreck/bitcoin:latest bitcoin \ No newline at end of file