Skip to content

Commit 33860e5

Browse files
authored
Merge pull request #6900 from haskell/validate-dockerfile-generator
Template docker files used for validation
2 parents 1b20816 + bbc8872 commit 33860e5

17 files changed

+441
-59
lines changed

.docker/validate-7.10.3.dockerfile

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,24 @@ RUN mkdir -p /root/.cabal/bin && \
88
rm -f cabal-plan.xz && \
99
chmod a+x /root/.cabal/bin/cabal-plan
1010

11+
# Install cabal-env
12+
RUN curl -sL https://github.com/phadej/cabal-extras/releases/download/preview-20191225/cabal-env-snapshot-20191225-x86_64-linux.xz > cabal-env.xz && \
13+
echo "1b567d529c5f627fd8c956e57ae8f0d9f11ee66d6db34b7fb0cb1c370b4edf01 cabal-env.xz" | sha256sum -c - && \
14+
xz -d < cabal-env.xz > $HOME/.cabal/bin/cabal-env && \
15+
rm -f cabal-env.xz && \
16+
chmod a+x $HOME/.cabal/bin/cabal-env
17+
18+
1119
# Update index
12-
RUN cabal v2-update
20+
RUN cabal v2-update --index-state="2020-06-12T23:36:15Z"
1321

1422
# We install happy, so it's in the store; we (hopefully) don't use it directly.
1523
RUN cabal v2-install happy --constraint 'happy ^>=1.19.12'
1624

1725
# Install some other dependencies
1826
# Remove $HOME/.ghc so there aren't any environments
1927
RUN cabal v2-install -w ghc-7.10.3 --lib \
28+
Cabal \
2029
aeson \
2130
async \
2231
base-compat \
@@ -27,25 +36,43 @@ RUN cabal v2-install -w ghc-7.10.3 --lib \
2736
echo \
2837
ed25519 \
2938
edit-distance \
30-
haskell-lexer \
3139
HTTP \
40+
lukko \
3241
network \
3342
optparse-applicative \
3443
pretty-show \
3544
regex-compat-tdfa \
45+
regex-posix \
3646
regex-tdfa \
37-
resolv \
47+
rere \
3848
statistics \
3949
tar \
4050
tasty \
4151
tasty-golden \
4252
tasty-hunit \
4353
tasty-quickcheck \
4454
tree-diff \
55+
void \
4556
zlib \
57+
resolv \
58+
parsec \
59+
text \
60+
--constraint="rere -rere-cfg" \
61+
--constraint="these -assoc" \
62+
--constraint="bytestring installed" \
63+
--constraint="binary installed" \
64+
--constraint="containers installed" \
65+
--constraint="deepseq installed" \
66+
--constraint="directory installed" \
67+
--constraint="filepath installed" \
68+
--constraint="pretty installed" \
69+
--constraint="process installed" \
70+
--constraint="time installed" \
71+
--constraint="unix installed" \
72+
--constraint="transformers installed" \
4673
&& rm -rf $HOME/.ghc
4774

4875
# Validate
4976
WORKDIR /build
5077
COPY . /build
51-
RUN sh ./validate.sh -w ghc-7.10.3 -v
78+
RUN sh ./validate.sh -w ghc-7.10.3 -v

.docker/validate-7.6.3.dockerfile

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# TODO: change to bionic
2-
# https://github.com/haskell-CI/haskell-ci/issues/342
31
FROM phadej/ghc:7.6.3-xenial
42

53
# Install cabal-plan
@@ -10,19 +8,27 @@ RUN mkdir -p /root/.cabal/bin && \
108
rm -f cabal-plan.xz && \
119
chmod a+x /root/.cabal/bin/cabal-plan
1210

11+
# Install cabal-env
12+
RUN curl -sL https://github.com/phadej/cabal-extras/releases/download/preview-20191225/cabal-env-snapshot-20191225-x86_64-linux.xz > cabal-env.xz && \
13+
echo "1b567d529c5f627fd8c956e57ae8f0d9f11ee66d6db34b7fb0cb1c370b4edf01 cabal-env.xz" | sha256sum -c - && \
14+
xz -d < cabal-env.xz > $HOME/.cabal/bin/cabal-env && \
15+
rm -f cabal-env.xz && \
16+
chmod a+x $HOME/.cabal/bin/cabal-env
17+
1318
# We need newer compiler, to install cabal-plan
1419
RUN apt-get update
1520
RUN apt-get install -y ghc-7.6.3-dyn
1621

1722
# Update index
18-
RUN cabal v2-update
23+
RUN cabal v2-update --index-state="2020-06-12T23:36:15Z"
1924

2025
# We install happy, so it's in the store; we (hopefully) don't use it directly.
2126
RUN cabal v2-install happy --constraint 'happy ^>=1.19.12'
2227

2328
# Install some other dependencies
2429
# Remove $HOME/.ghc so there aren't any environments
2530
RUN cabal v2-install -w ghc-7.6.3 --lib \
31+
Cabal \
2632
aeson \
2733
async \
2834
base-compat \
@@ -33,28 +39,28 @@ RUN cabal v2-install -w ghc-7.6.3 --lib \
3339
echo \
3440
ed25519 \
3541
edit-distance \
36-
haskell-lexer \
3742
HTTP \
38-
nats \
43+
lukko \
3944
network \
4045
optparse-applicative \
41-
parsec \
4246
pretty-show \
4347
regex-compat-tdfa \
48+
regex-posix \
4449
regex-tdfa \
4550
rere \
46-
semigroups \
4751
statistics \
4852
tar \
4953
tasty \
5054
tasty-golden \
5155
tasty-hunit \
5256
tasty-quickcheck \
53-
text \
5457
tree-diff \
55-
unordered-containers \
5658
void \
5759
zlib \
60+
parsec \
61+
text \
62+
--constraint="rere -rere-cfg" \
63+
--constraint="these -assoc" \
5864
--constraint="bytestring installed" \
5965
--constraint="binary installed" \
6066
--constraint="containers installed" \

.docker/validate-7.8.4.dockerfile

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# TODO: change to bionic
2-
# https://github.com/haskell-CI/haskell-ci/issues/342
31
FROM phadej/ghc:7.8.4-xenial
42

53
# Install cabal-plan
@@ -10,19 +8,27 @@ RUN mkdir -p /root/.cabal/bin && \
108
rm -f cabal-plan.xz && \
119
chmod a+x /root/.cabal/bin/cabal-plan
1210

11+
# Install cabal-env
12+
RUN curl -sL https://github.com/phadej/cabal-extras/releases/download/preview-20191225/cabal-env-snapshot-20191225-x86_64-linux.xz > cabal-env.xz && \
13+
echo "1b567d529c5f627fd8c956e57ae8f0d9f11ee66d6db34b7fb0cb1c370b4edf01 cabal-env.xz" | sha256sum -c - && \
14+
xz -d < cabal-env.xz > $HOME/.cabal/bin/cabal-env && \
15+
rm -f cabal-env.xz && \
16+
chmod a+x $HOME/.cabal/bin/cabal-env
17+
1318
# We need newer compiler, to install cabal-plan
1419
RUN apt-get update
1520
RUN apt-get install -y ghc-7.8.4-dyn
1621

1722
# Update index
18-
RUN cabal v2-update
23+
RUN cabal v2-update --index-state="2020-06-12T23:36:15Z"
1924

2025
# We install happy, so it's in the store; we (hopefully) don't use it directly.
2126
RUN cabal v2-install happy --constraint 'happy ^>=1.19.12'
2227

2328
# Install some other dependencies
2429
# Remove $HOME/.ghc so there aren't any environments
2530
RUN cabal v2-install -w ghc-7.8.4 --lib \
31+
Cabal \
2632
aeson \
2733
async \
2834
base-compat \
@@ -33,26 +39,28 @@ RUN cabal v2-install -w ghc-7.8.4 --lib \
3339
echo \
3440
ed25519 \
3541
edit-distance \
36-
haskell-lexer \
3742
HTTP \
43+
lukko \
3844
network \
3945
optparse-applicative \
40-
parsec \
4146
pretty-show \
4247
regex-compat-tdfa \
48+
regex-posix \
4349
regex-tdfa \
4450
rere \
45-
semigroups \
4651
statistics \
4752
tar \
4853
tasty \
4954
tasty-golden \
5055
tasty-hunit \
5156
tasty-quickcheck \
52-
text \
5357
tree-diff \
54-
unordered-containers \
58+
void \
5559
zlib \
60+
parsec \
61+
text \
62+
--constraint="rere -rere-cfg" \
63+
--constraint="these -assoc" \
5664
--constraint="bytestring installed" \
5765
--constraint="binary installed" \
5866
--constraint="containers installed" \
@@ -63,6 +71,7 @@ RUN cabal v2-install -w ghc-7.8.4 --lib \
6371
--constraint="process installed" \
6472
--constraint="time installed" \
6573
--constraint="unix installed" \
74+
--constraint="transformers installed" \
6675
&& rm -rf $HOME/.ghc
6776

6877
# Validate

.docker/validate-8.0.2.dockerfile

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ RUN mkdir -p /root/.cabal/bin && \
88
rm -f cabal-plan.xz && \
99
chmod a+x /root/.cabal/bin/cabal-plan
1010

11+
1112
# Update index
12-
RUN cabal v2-update
13+
RUN cabal v2-update --index-state="2020-06-12T23:36:15Z"
1314

1415
# We install happy, so it's in the store; we (hopefully) don't use it directly.
1516
RUN cabal v2-install happy --constraint 'happy ^>=1.19.12'
1617

1718
# Install some other dependencies
1819
# Remove $HOME/.ghc so there aren't any environments
1920
RUN cabal v2-install -w ghc-8.0.2 --lib \
21+
Cabal \
2022
aeson \
2123
async \
2224
base-compat \
@@ -27,25 +29,41 @@ RUN cabal v2-install -w ghc-8.0.2 --lib \
2729
echo \
2830
ed25519 \
2931
edit-distance \
30-
haskell-lexer \
3132
HTTP \
33+
lukko \
3234
network \
3335
optparse-applicative \
3436
pretty-show \
3537
regex-compat-tdfa \
38+
regex-posix \
3639
regex-tdfa \
37-
resolv \
40+
rere \
3841
statistics \
3942
tar \
4043
tasty \
4144
tasty-golden \
4245
tasty-hunit \
4346
tasty-quickcheck \
4447
tree-diff \
48+
void \
4549
zlib \
50+
resolv \
51+
--constraint="rere -rere-cfg" \
52+
--constraint="these -assoc" \
53+
--constraint="bytestring installed" \
54+
--constraint="binary installed" \
55+
--constraint="containers installed" \
56+
--constraint="deepseq installed" \
57+
--constraint="directory installed" \
58+
--constraint="filepath installed" \
59+
--constraint="pretty installed" \
60+
--constraint="process installed" \
61+
--constraint="time installed" \
62+
--constraint="unix installed" \
63+
--constraint="transformers installed" \
4664
&& rm -rf $HOME/.ghc
4765

4866
# Validate
4967
WORKDIR /build
5068
COPY . /build
51-
RUN sh ./validate.sh -w ghc-8.0.2 -v
69+
RUN sh ./validate.sh -w ghc-8.0.2 -v

.docker/validate-8.10.1.dockerfile

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,24 @@ RUN mkdir -p /root/.cabal/bin && \
88
rm -f cabal-plan.xz && \
99
chmod a+x /root/.cabal/bin/cabal-plan
1010

11+
# Install cabal-env
12+
RUN curl -sL https://github.com/phadej/cabal-extras/releases/download/preview-20191225/cabal-env-snapshot-20191225-x86_64-linux.xz > cabal-env.xz && \
13+
echo "1b567d529c5f627fd8c956e57ae8f0d9f11ee66d6db34b7fb0cb1c370b4edf01 cabal-env.xz" | sha256sum -c - && \
14+
xz -d < cabal-env.xz > $HOME/.cabal/bin/cabal-env && \
15+
rm -f cabal-env.xz && \
16+
chmod a+x $HOME/.cabal/bin/cabal-env
17+
18+
1119
# Update index
12-
RUN cabal v2-update
20+
RUN cabal v2-update --index-state="2020-06-12T23:36:15Z"
1321

1422
# We install happy, so it's in the store; we (hopefully) don't use it directly.
1523
RUN cabal v2-install happy --constraint 'happy ^>=1.19.12'
1624

1725
# Install some other dependencies
1826
# Remove $HOME/.ghc so there aren't any environments
1927
RUN cabal v2-install -w ghc-8.10.1 --lib \
28+
Cabal \
2029
aeson \
2130
async \
2231
base-compat \
@@ -27,21 +36,27 @@ RUN cabal v2-install -w ghc-8.10.1 --lib \
2736
echo \
2837
ed25519 \
2938
edit-distance \
30-
haskell-lexer \
3139
HTTP \
40+
lukko \
3241
network \
3342
optparse-applicative \
3443
pretty-show \
3544
regex-compat-tdfa \
45+
regex-posix \
3646
regex-tdfa \
47+
rere \
3748
statistics \
3849
tar \
3950
tasty \
4051
tasty-golden \
4152
tasty-hunit \
4253
tasty-quickcheck \
4354
tree-diff \
55+
void \
4456
zlib \
57+
resolv \
58+
--constraint="rere -rere-cfg" \
59+
--constraint="these -assoc" \
4560
--constraint="bytestring installed" \
4661
--constraint="binary installed" \
4762
--constraint="containers installed" \
@@ -52,9 +67,10 @@ RUN cabal v2-install -w ghc-8.10.1 --lib \
5267
--constraint="process installed" \
5368
--constraint="time installed" \
5469
--constraint="unix installed" \
70+
--constraint="transformers installed" \
5571
&& rm -rf $HOME/.ghc
5672

5773
# Validate
5874
WORKDIR /build
5975
COPY . /build
60-
RUN sh ./validate.sh -w ghc-8.10.1 -v
76+
RUN sh ./validate.sh -w ghc-8.10.1 -v

0 commit comments

Comments
 (0)