diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2fa895e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM golang:1.18 + +# Clone go algorand +RUN mkdir -p "/Users/fergal/" +WORKDIR "/Users/fergal/" +RUN git clone https://github.com/algorand/go-algorand.git + +# Checkout v3.8.1 +WORKDIR "/Users/fergal/go-algorand/" +RUN git checkout v3.8.1-stable + +# run algo node builds +RUN ./scripts/configure_dev.sh +RUN ./scripts/buildtools/install_buildtools.sh +RUN make install + +# Run on host machine: +# ==================== +# ``` +# docker build -t local/algojig .; +# docker run -v $(pwd):/algojig -ti local/algojig /bin/bash -c "cd /algojig/gojig; go build -o ../algojig/algojig_linux_x86_64"; +# ``` diff --git a/algojig/algojig_arm64 b/algojig/algojig_darwin_arm64 similarity index 100% rename from algojig/algojig_arm64 rename to algojig/algojig_darwin_arm64 diff --git a/algojig/algojig_x86_64 b/algojig/algojig_darwin_x86_64 similarity index 100% rename from algojig/algojig_x86_64 rename to algojig/algojig_darwin_x86_64 diff --git a/algojig/algojig_linux_x86_64 b/algojig/algojig_linux_x86_64 new file mode 100755 index 0000000..b3757a4 Binary files /dev/null and b/algojig/algojig_linux_x86_64 differ diff --git a/algojig/gojig.py b/algojig/gojig.py index 7c0250e..181c339 100644 --- a/algojig/gojig.py +++ b/algojig/gojig.py @@ -9,8 +9,9 @@ import algojig -machine = platform.machine() -binary = f'algojig_{machine}' +machine = platform.machine().lower() +system = platform.system().lower() +binary = f'algojig_{system}_{machine}' def run(command, *args, input=None):