Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
Viper Staking
Docker Containers
Commits
0ffe6974
Commit
0ffe6974
authored
Feb 06, 2022
by
Dylan Crocker
Browse files
Updated for v1.33.0. Also, more parity between the slim and regular builds.
parent
3c782075
Changes
3
Hide whitespace changes
Inline
Side-by-side
cardano-node/Dockerfile
View file @
0ffe6974
...
...
@@ -21,11 +21,11 @@ RUN apt-get update && apt-get install -y \
wget
\
libncursesw5
\
libtool
\
autoconf
WORKDIR
/opt
autoconf
\
curl
# Build and install the IOHK fork of libsodium.
WORKDIR
/opt
RUN
git clone https://github.com/input-output-hk/libsodium
\
&&
cd
libsodium
\
&&
git checkout 66f017f1
\
...
...
@@ -37,39 +37,59 @@ ENV LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
ENV
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
# Install cabal
RUN
wget https://downloads.haskell.org/~cabal/cabal-install-3.2.0.0/cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz
\
&&
tar
-xf
cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz
\
&&
rm
cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz cabal.sig
\
WORKDIR
/opt
RUN
wget https://downloads.haskell.org/~cabal/cabal-install-3.4.1.0/cabal-install-3.4.1.0-x86_64-linux-deb10.tar.xz
\
&&
tar
-xf
cabal-install-3.4.1.0-x86_64-linux-deb10.tar.xz
\
&&
rm
cabal-install-3.4.1.0-x86_64-linux-deb10.tar.xz
\
&&
mv
cabal /usr/local/bin/
\
&&
cabal update
# Install GHC
RUN
wget https://downloads.haskell.org/ghc/8.10.2/ghc-8.10.2-x86_64-deb9-linux.tar.xz
\
&&
tar
-xf
ghc-8.10.2-x86_64-deb9-linux.tar.xz
\
&&
rm
ghc-8.10.2-x86_64-deb9-linux.tar.xz
\
&&
cd
ghc-8.10.2
\
WORKDIR
/opt
RUN
wget https://downloads.haskell.org/ghc/8.10.7/ghc-8.10.7-x86_64-deb9-linux.tar.xz
\
&&
tar
-xf
ghc-8.10.7-x86_64-deb9-linux.tar.xz
\
&&
rm
ghc-8.10.7-x86_64-deb9-linux.tar.xz
\
&&
cd
ghc-8.10.7
\
&&
./configure
\
&&
make
install
# Install cardano node
ARG
TAG=1.27.0
# Build and install cardano node
WORKDIR
/opt
ARG
TAG=1.33.0
RUN
git clone https://github.com/input-output-hk/cardano-node.git
\
&&
cd
cardano-node
\
&&
git fetch
--all
--recurse-submodules
--tags
\
&&
git tag
&&
git checkout tags/
$TAG
\
&&
cabal configure
--with-compiler
=
ghc-8.10.
2
\
&&
cabal configure
--with-compiler
=
ghc-8.10.
7
\
&&
echo
"package cardano-crypto-praos"
>>
cabal.project.local
\
&&
echo
" flags: -external-libsodium-vrf"
>>
cabal.project.local
\
&&
cabal build
-j16
all
\
&&
mkdir
/opt/bin/
\
&&
cp
-p
dist-newstyle/build/x86_64-linux/ghc-8.10.2/cardano-node-
$TAG
/x/cardano-node/build/cardano-node/cardano-node /opt/bin/
\
&&
cp
-p
dist-newstyle/build/x86_64-linux/ghc-8.10.2/cardano-cli-
$TAG
/x/cardano-cli/build/cardano-cli/cardano-cli /opt/bin/
&&
cp
-p
dist-newstyle/build/x86_64-linux/ghc-8.10.7/cardano-node-
$TAG
/x/cardano-node/build/cardano-node/cardano-node /opt/bin/
\
&&
cp
-p
dist-newstyle/build/x86_64-linux/ghc-8.10.7/cardano-cli-
$TAG
/x/cardano-cli/build/cardano-cli/cardano-cli /opt/bin/
# Install Rust
WORKDIR
/opt
RUN
mkdir
-p
$HOME
/.cargo/bin
\
&&
curl
--proto
'=https'
--tlsv1
.2
-sSf
https://sh.rustup.rs | sh
-s
--
-y
ENV
PATH="/root/.cargo/bin:${PATH}"
RUN
rustup
install
stable
&&
rustup default stable
&&
rustup update
\
&&
rustup component add clippy rustfmt
# Build and install CNCLI
WORKDIR
/opt
ARG
CNCLI_TAG=v4.0.4
RUN
git clone
--recurse-submodules
https://github.com/AndrewWestberg/cncli
\
&&
cd
cncli
\
&&
git checkout
$CNCLI_TAG
\
&&
cargo
install
--path
.
--force
\
&&
cncli
--version
# Install Prometheus Node Exporter
ARG
VERSION=1.0.1
ARG
DIRNAME="node_exporter-$VERSION.linux-amd64"
RUN
cd
/root
\
&&
wget https://github.com/prometheus/node_exporter/releases/download/v
$VERSION
/
$DIRNAME
.tar.gz
\
WORKDIR
/opt
RUN
wget https://github.com/prometheus/node_exporter/releases/download/v
$VERSION
/
$DIRNAME
.tar.gz
\
&&
tar
xvfz
$DIRNAME
.tar.gz
\
&&
mv
$DIRNAME
/node_exporter /usr/local/bin
...
...
@@ -79,6 +99,8 @@ COPY --from=build /usr/local/lib/libsodium* /usr/local/lib/
COPY
--from=build /opt/bin/cardano-cli /usr/local/bin/
COPY
--from=build /opt/bin/cardano-node /usr/local/bin/
COPY
--from=build /usr/local/bin/node_exporter /usr/local/bin
COPY
--from=build /root/.cargo/bin/cncli /usr/local/bin
COPY
--from=build /opt/cncli/scripts/ /root/scripts
ENV
LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
ENV
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
...
...
cardano-node/slim/Dockerfile
View file @
0ffe6974
...
...
@@ -21,11 +21,11 @@ RUN apt-get update && apt-get install -y \
wget
\
libncursesw5
\
libtool
\
autoconf
WORKDIR
/opt
autoconf
\
curl
# Build and install the IOHK fork of libsodium.
WORKDIR
/opt
RUN
git clone https://github.com/input-output-hk/libsodium
\
&&
cd
libsodium
\
&&
git checkout 66f017f1
\
...
...
@@ -37,33 +37,36 @@ ENV LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
ENV
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
# Install cabal
RUN
wget https://downloads.haskell.org/~cabal/cabal-install-3.2.0.0/cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz
\
&&
tar
-xf
cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz
\
&&
rm
cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz cabal.sig
\
WORKDIR
/opt
RUN
wget https://downloads.haskell.org/~cabal/cabal-install-3.4.1.0/cabal-install-3.4.1.0-x86_64-linux-deb10.tar.xz
\
&&
tar
-xf
cabal-install-3.4.1.0-x86_64-linux-deb10.tar.xz
\
&&
rm
cabal-install-3.4.1.0-x86_64-linux-deb10.tar.xz
\
&&
mv
cabal /usr/local/bin/
\
&&
cabal update
# Install GHC
RUN
wget https://downloads.haskell.org/ghc/8.10.2/ghc-8.10.2-x86_64-deb9-linux.tar.xz
\
&&
tar
-xf
ghc-8.10.2-x86_64-deb9-linux.tar.xz
\
&&
rm
ghc-8.10.2-x86_64-deb9-linux.tar.xz
\
&&
cd
ghc-8.10.2
\
WORKDIR
/opt
RUN
wget https://downloads.haskell.org/ghc/8.10.7/ghc-8.10.7-x86_64-deb9-linux.tar.xz
\
&&
tar
-xf
ghc-8.10.7-x86_64-deb9-linux.tar.xz
\
&&
rm
ghc-8.10.7-x86_64-deb9-linux.tar.xz
\
&&
cd
ghc-8.10.7
\
&&
./configure
\
&&
make
install
# Install cardano node
ARG
TAG=1.27.0
# Build and install cardano node
WORKDIR
/opt
ARG
TAG=1.33.0
RUN
git clone https://github.com/input-output-hk/cardano-node.git
\
&&
cd
cardano-node
\
&&
git fetch
--all
--recurse-submodules
--tags
\
&&
git tag
&&
git checkout tags/
$TAG
\
&&
cabal configure
--with-compiler
=
ghc-8.10.
2
\
&&
cabal configure
--with-compiler
=
ghc-8.10.
7
\
&&
echo
"package cardano-crypto-praos"
>>
cabal.project.local
\
&&
echo
" flags: -external-libsodium-vrf"
>>
cabal.project.local
\
&&
cabal build
-j16
all
\
&&
mkdir
/opt/bin/
\
&&
cp
-p
dist-newstyle/build/x86_64-linux/ghc-8.10.
2
/cardano-node-
$TAG
/x/cardano-node/build/cardano-node/cardano-node /opt/bin/
\
&&
cp
-p
dist-newstyle/build/x86_64-linux/ghc-8.10.
2
/cardano-cli-
$TAG
/x/cardano-cli/build/cardano-cli/cardano-cli /opt/bin/
&&
cp
-p
dist-newstyle/build/x86_64-linux/ghc-8.10.
7
/cardano-node-
$TAG
/x/cardano-node/build/cardano-node/cardano-node /opt/bin/
\
&&
cp
-p
dist-newstyle/build/x86_64-linux/ghc-8.10.
7
/cardano-cli-
$TAG
/x/cardano-cli/build/cardano-cli/cardano-cli /opt/bin/
# Build the final stage and copy the build artifacts from the previous stage.
FROM
debian:buster-slim
...
...
debian-base/Dockerfile
View file @
0ffe6974
...
...
@@ -9,6 +9,7 @@ RUN apt-get update \
npm
\
vim
\
tmux
\
libffi-dev
\
python3
\
python3-pip
\
&&
rm
-rf
/var/lib/apt/lists/
*
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment