Skip to content

Commit

Permalink
Use cabal to build in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
diogob committed Nov 11, 2023
1 parent 08abd66 commit 32733ea
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM haskell:9.4.7-slim as builder
FROM haskell:9.6.3-slim as builder

# Postgres-websockets repo metadata
ARG GIT_REPO=https://github.com/diogob/postgres-websockets.git
ARG GIT_TAG=0.11.2.1
ARG GIT_TAG=multiple-docker-architectures

# Install System Dependencies
RUN apt-get update \
Expand All @@ -25,10 +25,9 @@ RUN git clone \

# Build the Project from source using the resolver it specifies
# https://github.com/diogob/postgres-websockets/tree/master#building-from-source
# https://github.com/diogob/postgres-websockets/blob/master/stack.yaml
WORKDIR /app/postgres-websockets
RUN stack setup
RUN stack install --resolver lts-21.14
RUN cabal build
RUN cabal install

# Lightweight Final Image
FROM debian:bullseye-slim
Expand All @@ -45,4 +44,4 @@ RUN apt-get update \
COPY --from=builder /root/.local/bin/postgres-websockets /usr/local/bin/postgres-websockets

# Set the Entry Point
ENTRYPOINT ["postgres-websockets"]
ENTRYPOINT ["postgres-websockets"]

0 comments on commit 32733ea

Please sign in to comment.