2022-05-12 00:30:50 +03:00
|
|
|
FROM utdemir/ghc-musl:v24-ghc902 AS build
|
2022-04-01 21:45:11 +03:00
|
|
|
WORKDIR /usr/src/app
|
2018-05-05 19:55:47 +03:00
|
|
|
COPY hapistrano.cabal .
|
2022-04-01 21:45:11 +03:00
|
|
|
RUN cabal update && \
|
2022-05-12 00:30:50 +03:00
|
|
|
cabal build --only-dependencies --enable-static
|
2022-04-01 21:45:11 +03:00
|
|
|
COPY . .
|
2022-05-12 00:30:50 +03:00
|
|
|
RUN cabal build --enable-executable-static && \
|
|
|
|
cp $(cabal exec which hap) hap
|
2018-05-14 16:23:06 +03:00
|
|
|
|
2022-04-01 21:45:11 +03:00
|
|
|
FROM alpine:3.15
|
|
|
|
MAINTAINER Nicolas Vivar <nvivar@stackbuilders.com>
|
|
|
|
RUN apk update && \
|
|
|
|
apk add \
|
|
|
|
ca-certificates \
|
|
|
|
git \
|
|
|
|
openssh-client
|
2018-05-22 17:03:00 +03:00
|
|
|
RUN mkdir ~/.ssh
|
2022-05-12 00:30:50 +03:00
|
|
|
COPY --from=build /usr/src/app/hap /usr/local/bin/hap
|
2022-04-01 21:45:11 +03:00
|
|
|
ENTRYPOINT ["/usr/local/bin/hap"]
|
2022-05-12 00:30:50 +03:00
|
|
|
CMD ["--help"]
|