From 8af6098455269549e68f014b492eade6d91511cb Mon Sep 17 00:00:00 2001 From: Orion Kindel Date: Mon, 27 Nov 2023 21:15:05 -0600 Subject: [PATCH] fix: initial commit --- Dockerfile | 37 ++++++++++++++++++++++--------------- README.md | 9 --------- stack.yaml | 25 +++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 24 deletions(-) delete mode 100644 README.md create mode 100644 stack.yaml diff --git a/Dockerfile b/Dockerfile index aac3cfc..44d4327 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,26 @@ -FROM debian:bookworm +FROM git.orionkindel.com/tpl/asdf:bookworm -RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - export DEBIAN_FRONTEND=noninteractive \ - && apt-get update -y \ - && apt-get upgrade -y \ - && apt-get install -y tini git curl +RUN git clone https://github.com/purescript/pursuit.git +RUN git clone https://github.com/purescript/pursuit-backups.git --depth 1 -RUN git clone https://github.com/asdf-vm/asdf.git /root/.asdf --branch v0.13.1 -RUN echo "source /root/.asdf/asdf.sh" >> /root/.bashrc -RUN echo "source /root/.asdf/completions/asdf.bash" >> /root/.bashrc -RUN chsh root -s /bin/bash +WORKDIR pursuit +RUN mkdir -p data/verified +RUN cp -R ../pursuit-backups/* data/verified -SHELL ["/bin/bash", "-lc"] +RUN apt-get update && apt-get install -y locales && sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && locale-gen +RUN echo 'LANG="en_US.UTF-8"' > /etc/default/locale \ + && echo "export LC_ALL=en_US.UTF-8" >> ~/.bashrc \ + && echo "export LANG=en_US.UTF-8" >> ~/.bashrc \ + && echo "export LANGUAGE=en_US.UTF-8" >> ~/.bashrc +RUN locale +RUN apt-get install -y wget libgmp-dev +RUN curl --silent \ + --show-error \ + --output /tmp/stack.tar.gz \ + --location 'https://github.com/commercialhaskell/stack/releases/download/v2.5.1/stack-2.5.1-linux-x86_64.tar.gz' \ + && tar -xzf /tmp/stack.tar.gz \ + && cp stack-2.5.1-linux-x86_64/stack /usr/bin +COPY stack.yaml . +RUN stack --no-terminal build --flag pursuit:-dev -RUN echo -n "bun purescript spago python rust" | xargs -d " " -I{} asdf plugin add {} - -ENTRYPOINT ["/usr/bin/tini", "--"] +CMD ["/bin/bash", "-lc", "stack exec pursuit"] diff --git a/README.md b/README.md deleted file mode 100644 index a4b1894..0000000 --- a/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# docker-asdf -`debian:bookworm` image preconfigured with `asdf` - -## Plugins -* rust -* bun -* purescript -* spago -* python diff --git a/stack.yaml b/stack.yaml new file mode 100644 index 0000000..10becf4 --- /dev/null +++ b/stack.yaml @@ -0,0 +1,25 @@ +resolver: lts-20.9 + +packages: + - "." + +extra-deps: + - yesod-form-1.6.7 + - git: https://github.com/PureFunctor/barrier.git + commit: db5e27c8ff8f98b2ea18036ce20f853a92aec595 + - bytestring-trie-0.2.7@sha256:f78e9d1dba699ce56080824693787918e9e8904db99d04d3470941420b1dd3ed,9010 + - classy-prelude-yesod-1.5.0 + - language-javascript-0.7.0.0 + - purescript-0.15.10 + - monoidal-containers-0.6.2.0 + - protolude-0.3.1 + - process-1.6.13.1 + - Cabal-3.6.3.0 + +flags: + pursuit: + dev: true + aeson-pretty: + lib-only: true + these: + assoc: false