Skip to content

Run Fuego in Docker or Podman environment

ÆJT edited this page Nov 8, 2022 · 1 revision

Method of running inside podman container (podman is open source docker). by Morpheus

First make staging build of binaries using the following Dockerfile. Build it using podman build -t fuegostage -f ~/oci/Dockerfile.fuegostage:

FROM docker.io/library/debian:buster-slim

RUN apt update && apt install git gcc-8 g++-8 make cmake libboost-all-dev -y && apt clean all \
&& cd \
&& git clone -b master --single-branch --depth 1 https://github.com/usexfg/fuego.git \
&& cd fuego && mkdir build && cd build \
&& CC=gcc-8 CXX=g++-8 cmake -DCMAKE_BUILD_TYPE=Release .. && make -j8

Daemon could be run from here but to go a step further by taking the binaries only into a minimal environment - Build it using podman build -t fuegoprod -f ~/oci/Dockerfile.fuegoprod:

FROM busybox:glibc

COPY --from=fuegostage /usr/lib/x86_64-linux-gnu/librt.so /lib/librt.so.1
COPY --from=fuegostage /usr/lib/x86_64-linux-gnu/libdl.so /lib/libdl.so.2
COPY --from=fuegostage /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /lib/libstdc++.so.6
COPY --from=fuegostage /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/libgcc_s.so.1
COPY --from=fuegostage /fango/build/src/fangod /usr/bin/fangod
COPY --from=fuegostage /fango/build/src/simplewallet /usr/bin/simplewallet
COPY --from=fuegostage /fango/build/src/miner /usr/bin/miner
EXPOSE 18180 10808
CMD ["fuegod","--version"]

Then run the daemon from a script with the following command:

podman run --rm -it --name=fuegod --net=host \
-v /storageb/fuego-data:/root/fuego-data:z \
fuegoprod fuegod \
--data-dir /root/fuego-data

The -v switch maps our data-dir from the local filesystem to /root/fuego-data in the container.

Clone this wiki locally