From 1dadef70a817dedd90dfb949bb7f4aac599845f6 Mon Sep 17 00:00:00 2001 From: mleku Date: Tue, 7 Nov 2023 19:17:33 +0000 Subject: [PATCH 1/2] arch linux dockerfile --- arch.Dockerfile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 arch.Dockerfile diff --git a/arch.Dockerfile b/arch.Dockerfile new file mode 100644 index 0000000..6443caf --- /dev/null +++ b/arch.Dockerfile @@ -0,0 +1,36 @@ +# arch based Dockerfile built by mleku +# npub1mlekuhhxqq6p8w9x5fs469cjk3fu9zw7uptujr55zmpuhhj48u3qnwx3q5 + +FROM archlinux:latest AS build + +WORKDIR /build + +COPY . . + +RUN pacman -Syu --noconfirm +RUN pacman -S --noconfirm base-devel git + +# perl things +RUN pacman -S --noconfirm cpanminus +RUN pacman -S --noconfirm perl-template-toolkit +RUN pacman -S --noconfirm perl-yaml +RUN /usr/bin/vendor_perl/cpanm Regexp::Grammars + +# flatbuffers +RUN pacman -S --noconfirm flatbuffers + +# lmdb +RUN pacman -S --noconfirm lmdb + +# secp256k1 +RUN pacman -S --noconfirm libsecp256k1 + +# build strfry +RUN git submodule update --init +RUN make setup-golpe +RUN make -j4 + +EXPOSE 7777 + +ENTRYPOINT ["/app/strfry"] +CMD ["relay"] From 55e42c24fa7936d39d439e42969a52562c4f6397 Mon Sep 17 00:00:00 2001 From: mleku Date: Tue, 7 Nov 2023 19:52:26 +0000 Subject: [PATCH 2/2] polished and better comments --- arch.Dockerfile | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/arch.Dockerfile b/arch.Dockerfile index 6443caf..311c610 100644 --- a/arch.Dockerfile +++ b/arch.Dockerfile @@ -1,34 +1,35 @@ # arch based Dockerfile built by mleku # npub1mlekuhhxqq6p8w9x5fs469cjk3fu9zw7uptujr55zmpuhhj48u3qnwx3q5 +# this is a basic dockerfile showing the build on arch linux -FROM archlinux:latest AS build +FROM archlinux:latest -WORKDIR /build +WORKDIR /app COPY . . +# update pacman keys and sync repos RUN pacman -Syu --noconfirm -RUN pacman -S --noconfirm base-devel git -# perl things -RUN pacman -S --noconfirm cpanminus -RUN pacman -S --noconfirm perl-template-toolkit -RUN pacman -S --noconfirm perl-yaml +RUN pacman -S --noconfirm \ +# build essentials + base-devel git \ +# perl stuff + cpanminus perl-template-toolkit perl-yaml \ +# flatbuffers, lmdb, libsecp256k1 + flatbuffers lmdb libsecp256k1 + +# necessary perl pod RUN /usr/bin/vendor_perl/cpanm Regexp::Grammars -# flatbuffers -RUN pacman -S --noconfirm flatbuffers +# update submodules +RUN git submodule update --init -# lmdb -RUN pacman -S --noconfirm lmdb - -# secp256k1 -RUN pacman -S --noconfirm libsecp256k1 +# build golpe +RUN make setup-golpe # build strfry -RUN git submodule update --init -RUN make setup-golpe -RUN make -j4 +RUN make EXPOSE 7777