@@ -5,8 +5,15 @@ FROM ubuntu@sha256:67211c14fa74f070d27cc59d69a7fa9aeff8e28ea118ef3babc295a0428a6
5
5
ARG GID=1000
6
6
ARG UID=1000
7
7
8
- ARG ghc_version=9.6.5
9
- ARG cabal_version=3.10.3.0
8
+ ARG GHC_VERSION=9.6.5
9
+ ARG CABAL_VERSION=3.10.3.0
10
+ ARG FOURMOLU_VERSION=0.14.1.0
11
+ ARG HLINT_VERSION=3.8
12
+ ARG APPLY_REFACT_VERSION=0.14.0.0
13
+ ARG CABAL_FMT_VERSION=0.1.12
14
+ ARG GHCID_VERSION=0.8.9
15
+ ARG GHC_TAGS_VERSION=1.8
16
+ ARG POSTGRESQL_MIGRATION_VERSION=0.2.1.8
10
17
11
18
# generate a working directory
12
19
USER "root"
@@ -23,29 +30,29 @@ RUN chown -R $USER:$USER /home/$USER/.cabal
23
30
WORKDIR /flora-server
24
31
25
32
RUN apt update && \
26
- apt install -y build-essential curl libffi-dev libffi8 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 git libsodium-dev
33
+ apt install -y build-essential curl libffi-dev libffi8 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 git libsodium-dev pkg-config
27
34
28
35
# install dependencies (pg_config, postgresql-client, yarn)
29
36
ENV BOOTSTRAP_HASKELL_NONINTERACTIVE="YES"
30
- ENV BOOTSTRAP_HASKELL_GHC_VERSION="$ghc_version"
31
- ENV BOOTSTRAP_HASKELL_CABAL_VERSION="$cabal_version"
32
37
ENV BOOTSTRAP_HASKELL_INSTALL_NO_STACK="YES"
33
38
ENV BOOTSTRAP_HASKELL_INSTALL_NO_STACK_HOOK="YES"
34
- ENV BOOTSTRAP_HASKELL_INSTALL_HLS= "YES "
39
+ ENV PATH= "$PATH:/home/$USER/.ghcup/bin "
35
40
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
36
41
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
37
42
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
38
43
RUN apt install -y nodejs libpq-dev mcpp wget zsh tmux postgresql-client
39
44
RUN corepack enable
40
- RUN chmod ugo+x /home/$USER/.cabal
41
-
42
45
USER ${USER}
46
+ RUN chmod ugo+x /home/$USER/.cabal
43
47
RUN git config --global --add safe.directory "*"
44
48
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
45
49
50
+ RUN ghcup install hls $HLS_VERSION \
51
+ && ghcup install ghc $GHC_VERSION \
52
+ && ghcup set ghc $GHC_VERSION \
53
+ && ghcup install cabal $CABAL_VERSION
46
54
47
55
USER ${USER}
48
- ENV PATH="$PATH:/home/$USER/.ghcup/bin"
49
56
50
57
# install soufflé
51
58
USER "root"
@@ -59,12 +66,13 @@ RUN echo $PATH
59
66
# to run `cabal update` as separate step, as cabal doesn't delete
60
67
# package versions)
61
68
RUN cabal update
62
- RUN cabal install -j postgresql-migration
63
- RUN cabal install -j hlint apply-refact
64
- RUN cabal install -j fourmolu-0.14.1.0
65
- RUN cabal install -j cabal-fmt
66
- RUN cabal install -j ghcid
67
- RUN cabal install -j ghc-tags
69
+ RUN cabal install -j postgresql-migration-$POSTGRESQL_MIGRATION_VERSION
70
+ RUN cabal install -j hlint-$HLINT_VERSION
71
+ RUN cabal install -j apply-refact-$APPLY_REFACT_VERSION
72
+ RUN cabal install -j fourmolu-$FOURMOLU_VERSION
73
+ RUN cabal install -j cabal-fmt-$CABAL_FMT_VERSION
74
+ RUN cabal install -j ghcid-$GHCID_VERSION
75
+ RUN cabal install -j ghc-tags-$GHC_TAGS_VERSION
68
76
69
77
# configure the shell
70
78
RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
0 commit comments