Updated dockerfile / ci setup
All checks were successful
Haskell CI / build (pull_request) Successful in 2m46s
Haskell CI / test (pull_request) Successful in 2m15s
Haskell CI / fourmolu (pull_request) Successful in 6s
Haskell CI / hlint (pull_request) Successful in 5s

This commit is contained in:
Igor Ranieri 2025-09-27 15:05:18 +02:00
parent de969f461b
commit 14372a7ce3
2 changed files with 32 additions and 48 deletions

View file

@ -1,30 +1,36 @@
FROM haskell:9.10
FROM haskell:9.10.2-bullseye AS builder
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y curl git && rm -rf /var/lib/apt/lists/*
# Install Node.js (for GitHub Actions compatibility)
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/*
# Update cabal and install Haskell tools
RUN cabal update && \
cabal install --install-method=copy --installdir=/usr/local/bin \
fourmolu \
hlint \
cabal-gild
fourmolu hlint cabal-gild
# Verify installations
RUN ghc --version && \
cabal --version && \
node --version && \
fourmolu --version && \
hlint --version && \
cabal-gild --version
# Set working directory
WORKDIR /workspace
FROM haskell:9.10.2-bullseye
RUN apt-get update && apt-get install -y \
libgmp10 \
curl \
&& rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/*
RUN cabal update
COPY --from=builder /usr/local/bin/cabal /usr/local/bin/
COPY --from=builder /usr/local/bin/fourmolu /usr/local/bin/
COPY --from=builder /usr/local/bin/hlint /usr/local/bin/
COPY --from=builder /usr/local/bin/cabal-gild /usr/local/bin/
WORKDIR /workspace
CMD [ "bash" ]