hapistrano/Dockerfile
David Mazarro e91090242d
Simplification of Nix flake and removal of GHC 8 (#245)
Co-authored-by: CristhianMotoche <cristhian.motoche@gmail.com>
Co-authored-by: Sebastián Estrella <2049686+sestrella@users.noreply.github.com>
2024-10-01 10:14:44 -05:00

21 lines
543 B
Docker

FROM quay.io/benz0li/ghc-musl:9.6.6 AS build
WORKDIR /usr/src/app
COPY hapistrano.cabal .
RUN cabal update && \
cabal build --only-dependencies --enable-static
COPY . .
RUN cabal build --enable-executable-static && \
cp $(cabal exec which hap) hap
FROM alpine:3.15
MAINTAINER Cristhian Motoche <cmotoche@stackbuilders.com>
RUN apk update && \
apk add \
ca-certificates \
git \
openssh-client
RUN mkdir ~/.ssh
COPY --from=build /usr/src/app/hap /usr/local/bin/hap
ENTRYPOINT ["/usr/local/bin/hap"]
CMD ["--help"]