mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-12 07:18:31 +01:00
Merge branch 'master' into master
This commit is contained in:
commit
b00f53bc7d
3
.github/PULL_REQUEST_TEMPLATE.md
vendored
3
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -4,5 +4,6 @@ Checklist:
|
||||
- [ ] On your own machine, in a _new directory_, you have successfully run the following set of commands (replace `$package` with the name of the package that is submitted, and `$version` with the version of the package you want to get into Stackage):
|
||||
|
||||
stack unpack $package-$version # $version is optional
|
||||
stack init --resolver nightly
|
||||
cd $package-$version
|
||||
rm -f stack.yaml && stack init --resolver nightly
|
||||
stack build --resolver nightly --haddock --test --bench --no-run-benchmarks
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
# Disable Docker stuff to try to make it faster
|
||||
sudo: true
|
||||
dist: bionic
|
||||
|
||||
# Choose a lightweight base image; we provide our own build tools.
|
||||
language: generic
|
||||
@ -10,14 +11,9 @@ addons:
|
||||
packages:
|
||||
- libgmp-dev
|
||||
|
||||
matrix:
|
||||
include:
|
||||
#- env: CHECK_SCRIPT="./etc/ci-script.sh"
|
||||
- env: CHECK_SCRIPT="./etc/curator-2-check.sh"
|
||||
|
||||
# Edit etc/ci-script.sh to change GHC version
|
||||
script:
|
||||
- $CHECK_SCRIPT
|
||||
- ./etc/check.sh
|
||||
|
||||
# Caching doesn't work with sudo: true
|
||||
#cache:
|
||||
|
||||
24
CURATORS.md
24
CURATORS.md
@ -18,7 +18,7 @@ This section sketches out at a high level how the entire Stackage build/curation
|
||||
process works:
|
||||
|
||||
* [build-constraints.yaml](https://github.com/commercialhaskell/stackage/blob/master/build-constraints.yaml) specifies packages to be included in Stackage
|
||||
* [curator](https://github.com/commercialhaskell/stack/tree/master/subs/curator) combines build-constraints.yaml with the current state of Hackage to create a build plan for a Stackage Nightly
|
||||
* [curator](https://github.com/commercialhaskell/curator) combines build-constraints.yaml with the current state of Hackage to create a build plan for a Stackage Nightly
|
||||
* `curator` can check that build plan to ensure all version bounds are consistent
|
||||
* The [Travis job](https://github.com/commercialhaskell/stackage/blob/master/.travis.yml) performs these two steps to provide immediate feedback on pull requests
|
||||
* Docker Hub [builds](https://github.com/commercialhaskell/stackage/blob/master/Dockerfile) a [Docker image](https://hub.docker.com/r/commercialhaskell/stackage/) for running builds
|
||||
@ -280,31 +280,33 @@ we're just not there yet.
|
||||
|
||||
```
|
||||
# Run a nightly build
|
||||
/opt/stackage-build/stackage/automated/run-nightly.sh
|
||||
/var/stackage/stackage/automated/run-nightly.sh
|
||||
|
||||
# Run an LTS minor bump
|
||||
/opt/stackage-build/stackage/automated/build-next.sh lts-14.17
|
||||
/var/stackage/stackage/automated/build.sh lts-15.1
|
||||
|
||||
# Run an LTS major bump
|
||||
/opt/stackage-build/stackage/automated/build-next.sh lts-15.0
|
||||
/var/stackage/stackage/automated/build.sh lts-16.0
|
||||
```
|
||||
|
||||
Recommended: run these from inside a `tmux` session. If you get version bound
|
||||
problems on nightly or LTS major, you need to fix build-constraints.yaml (see
|
||||
info above).
|
||||
info above).
|
||||
|
||||
### Building LTS minor releases
|
||||
First run `build-next.sh` to regenerate updated `ltsXX/work/constraints.yaml` and `ltsXX/work/snapshot-incomplete.yaml` files.
|
||||
Before running the build, please make sure that the Dockerfile in `automated/dockerfiles/lts-X.Y` is up to date, where X is the major version that you're building and Y is the latest minor version of X for which a Dockerfile exists. If any changes need to be made, (eg, new GHC version), copy `lts-X.Y/Dockerfile` to `lts-X.Z/Dockerfile`, where Z is the minor version you're building, and include the new changes.
|
||||
|
||||
First run `build.sh` to regenerate updated `ltsXX/work/constraints.yaml` and `ltsXX/work/snapshot-incomplete.yaml` files.
|
||||
|
||||
For an LTS minor bump, you'll typically want to:
|
||||
|
||||
* Add constraints to package `range:` fields _under_ the `source:` field in that `constraints.yaml`.
|
||||
* Add new packages versioned to `snapshot-incomplete.yaml` (the `@<hash>` suffix is optional)
|
||||
* Add new packages to the `constraints.yaml` file
|
||||
* Test, benchmark, haddock failures can also be added to package fields in the `constraints.yaml` if necessary, though it should be avoided if possible for LTS.
|
||||
|
||||
Then run `NOPLAN=1 build-next.sh` to build the generate an updated snapshot.
|
||||
Then run `NOPLAN=1 build.sh` to build the generate an updated snapshot.
|
||||
|
||||
This replaces `CONSTRAINTS=...' /opt/stackage-build/stackage/automated/build.sh lts-x.y` for the old curator-1.
|
||||
This replaces `CONSTRAINTS=...' /var/stackage/stackage/automated/build.sh lts-x.y` for the old curator-1.
|
||||
|
||||
If a build fails for bounds reasons, see all of the advice above. If the code
|
||||
itself doesn't build, or tests fail, open up an issue and then either put in a
|
||||
@ -335,8 +337,8 @@ LTS minor bumps typically are run on Sundays.
|
||||
|
||||
* You can detect the problem by running `df`. If you see that `/` is out of space, we have a problem
|
||||
* If you see that `/var/stackage/` is out of space, you can:
|
||||
* `rm -r /var/stackage/stackage/automated/lts*/work/unpack-dir/unpacked/`
|
||||
* `rm -r /var/stackage/stackage/automated/nightly/work/unpack-dir/unpacked/`
|
||||
* `rm -r /var/stackage/stackage/automated/work/lts*/unpack-dir/unpacked/`
|
||||
* `rm -r /var/stackage/stackage/automated/work/nightly/unpack-dir/unpacked/`
|
||||
* (outdated) There are many temp files inside `/home/ubuntu/stackage-server-cron` that can be cleared out occasionally
|
||||
* (outdated) You can then manually run `/home/ubuntu/stackage-server-cron.sh`, or wait for the cron job to do it
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ FROM fpco/pid1:18.04
|
||||
|
||||
ENV HOME /home/stackage
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV GHCVER 8.8.2
|
||||
ENV GHCVER 8.8.3
|
||||
|
||||
# NOTE: also update debian-bootstrap.sh when cuda version changes
|
||||
ENV PATH /home/stackage/.stack/programs/x86_64-linux/ghc-$GHCVER/bin:/usr/local/cuda-10.0/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
|
||||
14
automated/.gitignore
vendored
14
automated/.gitignore
vendored
@ -1,12 +1,2 @@
|
||||
/auth-token
|
||||
/bin/
|
||||
/gitconfig
|
||||
/hackage-creds
|
||||
/ssh-nightly/
|
||||
/ssh-lts/
|
||||
/nighlty/
|
||||
/lts-*/
|
||||
/stackage-curator/
|
||||
/stackage-update/
|
||||
/aws.sh
|
||||
/crondir/
|
||||
/work/
|
||||
/*-build.log
|
||||
|
||||
@ -5,7 +5,7 @@ set -eu +x -o pipefail
|
||||
ROOT=$(cd $(dirname $0) ; pwd)
|
||||
TARGET=$1
|
||||
|
||||
source aws.sh
|
||||
source work/aws.sh
|
||||
|
||||
# For nightly-YYYY-MM-DD, tag should be nightly
|
||||
# For lts-X.Y, tag should be ltsX
|
||||
@ -13,39 +13,36 @@ SHORTNAME=$(echo $TARGET | cut -d- -f 1)
|
||||
if [ $SHORTNAME = "lts" ]
|
||||
then
|
||||
TAG=$(echo $TARGET | sed 's@^lts-\([0-9]*\)\.[0-9]*@lts\1@')
|
||||
WORKDIR=$ROOT/work/$(echo $TARGET | sed 's@^lts-\([0-9]*\)\.[0-9]*@lts-\1@')
|
||||
else
|
||||
TAG=$SHORTNAME
|
||||
WORKDIR=$ROOT/work/$TAG
|
||||
fi
|
||||
|
||||
IMAGE=commercialhaskell/stackage:$TAG
|
||||
|
||||
CABAL_DIR=$ROOT/cabal
|
||||
PANTRY_DIR=$ROOT/pantry
|
||||
STACK_DIR=$ROOT/stack-$TAG
|
||||
GHC_DIR=$ROOT/ghc
|
||||
DOT_STACKAGE_DIR=$ROOT/dot-stackage
|
||||
WORKDIR=$ROOT/$TAG/work
|
||||
PANTRY_DIR=$ROOT/work/stack/pantry
|
||||
STACK_DIR=$ROOT/work/stack
|
||||
DOT_STACKAGE_DIR=$ROOT/work/dot-stackage
|
||||
# ssh key is used for committing snapshots (and their constraints) to Github
|
||||
SSH_DIR=$ROOT/ssh
|
||||
SSH_DIR=$ROOT/work/ssh
|
||||
USERID=$(id -u)
|
||||
|
||||
mkdir -p \
|
||||
"$CABAL_DIR" \
|
||||
"$PANTRY_DIR" \
|
||||
"$STACK_DIR" \
|
||||
"$GHC_DIR" \
|
||||
"$DOT_STACKAGE_DIR" \
|
||||
"$WORKDIR" \
|
||||
"$SSH_DIR"
|
||||
|
||||
GITCONFIG=$ROOT/gitconfig
|
||||
GITCONFIG=$ROOT/work/gitconfig
|
||||
cat >$GITCONFIG <<EOF
|
||||
[user]
|
||||
email = michael+stackage-build@fpcomplete.com
|
||||
name = Stackage Build host
|
||||
EOF
|
||||
|
||||
HACKAGE_CREDS=$ROOT/hackage-creds
|
||||
HACKAGE_CREDS=$ROOT/work/hackage-creds
|
||||
|
||||
function require_400_file {
|
||||
if [ ! -f "$1" ]
|
||||
@ -60,17 +57,19 @@ function require_400_file {
|
||||
require_400_file "$SSH_DIR/id_rsa"
|
||||
require_400_file "$HACKAGE_CREDS"
|
||||
|
||||
mkdir -p $ROOT/bin
|
||||
BINDIR=$(cd $ROOT/bin ; pwd)
|
||||
mkdir -p $ROOT/work/bin
|
||||
BINDIR=$(cd $ROOT/work/bin ; pwd)
|
||||
(
|
||||
# See etc/curator-exes/README.md
|
||||
CURATOR_EXES=84f6e06e11e1bcdab6ec1a302d40213e406748e64ae455bd4ed09a205651a7fd
|
||||
cd $BINDIR
|
||||
rm -f curator stack *.bz2
|
||||
wget "https://s3.amazonaws.com/download.fpcomplete.com/curator-exes/curator-exes-$CURATOR_EXES.tar.bz2"
|
||||
tar xf "curator-exes-$CURATOR_EXES.tar.bz2"
|
||||
|
||||
curl -L "https://download.fpcomplete.com/stackage-curator-2/curator-7c719d6d48839c94a79dc2ad2ace89074e3dd997.bz2" | bunzip2 > curator
|
||||
chmod +x curator
|
||||
echo -n "curator version: "
|
||||
docker run --rm -v $(pwd)/curator:/exe $IMAGE /exe --version
|
||||
|
||||
curl -L "https://download.fpcomplete.com/stackage-curator-2/stack-fffc0a40e2253788f6b9cb7471c03fd571d69bde.bz2" | bunzip2 > stack
|
||||
chmod +x stack
|
||||
echo -n "stack version: "
|
||||
docker run --rm -v $(pwd)/stack:/exe $IMAGE /exe --version
|
||||
)
|
||||
@ -79,11 +78,11 @@ docker run --rm -v $(pwd)/stack:/exe $IMAGE /exe --version
|
||||
# is stored separately (because e.g. Ubuntu releases between LTS and nightly
|
||||
# could differ). Also the order of binds is important.
|
||||
ARGS_COMMON="--rm -v $WORKDIR:$HOME/work -w $HOME/work -v $BINDIR/curator:/usr/bin/curator:ro -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v $BINDIR/stack:/usr/bin/stack:ro -v $STACK_DIR:$HOME/.stack -v $PANTRY_DIR:$HOME/.stack/pantry"
|
||||
ARGS_PREBUILD="$ARGS_COMMON -u $USERID -e HOME=$HOME -v $CABAL_DIR:$HOME/.cabal -v $GHC_DIR:$HOME/.ghc -v $DOT_STACKAGE_DIR:$HOME/.stackage"
|
||||
ARGS_BUILD="$ARGS_COMMON -v $CABAL_DIR:$HOME/.cabal:ro -v $GHC_DIR:$HOME/.ghc:ro"
|
||||
ARGS_PREBUILD="$ARGS_COMMON -u $USERID -e HOME=$HOME -v $DOT_STACKAGE_DIR:$HOME/.stackage"
|
||||
ARGS_BUILD="$ARGS_COMMON"
|
||||
# instance-data is an undocumented feature of S3 used by amazonka,
|
||||
# see https://github.com/brendanhay/amazonka/issues/271
|
||||
ARGS_UPLOAD="$ARGS_COMMON -u $USERID -e HOME=$HOME -v $HACKAGE_CREDS:/hackage-creds:ro -v $DOT_STACKAGE_DIR:$HOME/.stackage -v $SSH_DIR:$HOME/.ssh:ro -v $GITCONFIG:$HOME/.gitconfig:ro -v $CABAL_DIR:$HOME/.cabal:ro -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY"
|
||||
ARGS_UPLOAD="$ARGS_COMMON -u $USERID -e HOME=$HOME -v $HACKAGE_CREDS:/hackage-creds:ro -v $DOT_STACKAGE_DIR:$HOME/.stackage -v $SSH_DIR:$HOME/.ssh:ro -v $GITCONFIG:$HOME/.gitconfig:ro -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -v $DOT_STACKAGE_DIR:/dot-stackage"
|
||||
|
||||
# Make sure we actually need this snapshot. We only check this for LTS releases
|
||||
# since, for nightlies, we'd like to run builds even if they are unnecessary to
|
||||
@ -108,7 +107,7 @@ then
|
||||
docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "curator update && curator constraints --target $TARGET && curator snapshot-incomplete --target $TARGET && curator snapshot"
|
||||
fi
|
||||
else
|
||||
docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "curator snapshot"
|
||||
docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "curator snapshot-incomplete --target $TARGET && curator snapshot"
|
||||
fi
|
||||
|
||||
|
||||
@ -139,19 +138,28 @@ docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "exec curator check-target-available
|
||||
#
|
||||
# * Upload the docs to S3
|
||||
# * Upload the new snapshot .yaml file to the appropriate Github repo, also upload its constraints
|
||||
# * Register as a new Hackage distro (currently disabled)
|
||||
docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "curator upload-docs --target $TARGET && curator upload-github --target $TARGET && exec curator hackage-distro --target $TARGET"
|
||||
# information about the new snapshots on Hackage
|
||||
docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "curator upload-docs --target $TARGET && curator upload-github --target $TARGET"
|
||||
|
||||
$BINDIR/curator legacy-bulk --stackage-snapshots dot-stackage/curator/stackage-snapshots/ --lts-haskell dot-stackage/curator/lts-haskell/ --stackage-nightly dot-stackage/curator/stackage-nightly/
|
||||
# For some reason, registering on Hackage fails with inscrutable error messages. Disabling.
|
||||
# docker run $ARGS_UPLOAD $IMAGE /bin/bash -c "exec curator hackage-distro --target $TARGET"
|
||||
|
||||
(
|
||||
docker run $ARGS_UPLOAD $IMAGE curator legacy-bulk --stackage-snapshots /dot-stackage/curator/stackage-snapshots/ --lts-haskell /dot-stackage/curator/lts-haskell/ --stackage-nightly /dot-stackage/curator/stackage-nightly/
|
||||
|
||||
# Build and push docker image fpco/stack-build & fpco/stack-build-small for current release
|
||||
|
||||
if [ $SHORTNAME = "lts" ]
|
||||
then
|
||||
cd dot-stackage/curator/lts-haskell
|
||||
$ROOT/dockerfiles/build.sh $TARGET
|
||||
$ROOT/dockerfiles/build.sh --push $TARGET
|
||||
$ROOT/dockerfiles/build.sh --push --small $TARGET
|
||||
fi
|
||||
|
||||
(
|
||||
if [ $SHORTNAME = "lts" ]
|
||||
then
|
||||
cd $DOT_STACKAGE_DIR/curator/lts-haskell
|
||||
else
|
||||
cd dot-stackage/curator/stackage-nightly
|
||||
cd $DOT_STACKAGE_DIR/curator/stackage-nightly
|
||||
fi
|
||||
|
||||
git add *.yaml
|
||||
@ -159,14 +167,7 @@ git diff-index --quiet HEAD && echo No changes && exit 0
|
||||
git config user.name "Stackage build server"
|
||||
git config user.email "michael@snoyman.com"
|
||||
git commit -a -m "More conversions $(date)"
|
||||
|
||||
if [ $SHORTNAME = "lts" ]
|
||||
then
|
||||
GIT_SSH_COMMAND="ssh -i $ROOT/ssh-lts/id_rsa" git push origin master
|
||||
else
|
||||
GIT_SSH_COMMAND="ssh -i $ROOT/ssh-nightly/id_rsa" git push origin master
|
||||
fi
|
||||
|
||||
GIT_SSH_COMMAND="ssh -i $SSH_DIR/id_rsa" git push origin master
|
||||
)
|
||||
|
||||
echo -n "Completed at "
|
||||
@ -1,72 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script is intended for testing Cabal HEAD against a Stackage snapshot.
|
||||
|
||||
set -eux
|
||||
|
||||
ROOT=$(cd $(dirname $0) ; pwd)
|
||||
TARGET=$1
|
||||
|
||||
# For nightly-YYYY-MM-DD, tag should be nightly
|
||||
# For lts-X.Y, tag should be ltsX
|
||||
SHORTNAME=$(echo $TARGET | cut -d- -f 1)
|
||||
if [ $SHORTNAME = "lts" ]
|
||||
then
|
||||
TAG=$(echo $TARGET | sed 's@^lts-\([0-9]*\)\.[0-9]*@lts\1@')
|
||||
PLAN_URL=https://raw.githubusercontent.com/fpco/lts-haskell/master/$TARGET.yaml
|
||||
else
|
||||
TAG=$SHORTNAME
|
||||
PLAN_URL=https://raw.githubusercontent.com/fpco/stackage-nightly/master/$TARGET.yaml
|
||||
fi
|
||||
|
||||
IMAGE=snoyberg/stackage:$TAG
|
||||
|
||||
PLAN_FILE=$TARGET-plan.yaml
|
||||
DOCMAP_FILE=$TARGET-docmap.yaml
|
||||
BUNDLE_FILE=$TARGET.bundle=
|
||||
|
||||
CABAL_DIR=$ROOT/cabal
|
||||
STACK_DIR=$ROOT/stack
|
||||
GHC_DIR=$ROOT/ghc
|
||||
DOT_STACKAGE_DIR=$ROOT/dot-stackage
|
||||
WORKDIR=$ROOT/$TAG/work
|
||||
EXTRA_BIN_DIR=$ROOT/extra-bin
|
||||
|
||||
mkdir -p \
|
||||
"$CABAL_DIR" \
|
||||
"$STACK_DIR" \
|
||||
"$GHC_DIR" \
|
||||
"$DOT_STACKAGE_DIR" \
|
||||
"$WORKDIR" \
|
||||
"$EXTRA_BIN_DIR"
|
||||
|
||||
curl "$PLAN_URL" > $WORKDIR/$PLAN_FILE
|
||||
|
||||
mkdir -p $ROOT/bin
|
||||
BINDIR=$(cd $ROOT/bin ; pwd)
|
||||
(
|
||||
cd $BINDIR
|
||||
rm -f stackage-curator stackage-curator.bz2
|
||||
wget https://s3.amazonaws.com/stackage-travis/stackage-curator/stackage-curator.bz2
|
||||
bunzip2 stackage-curator.bz2
|
||||
chmod +x stackage-curator
|
||||
)
|
||||
|
||||
ARGS_COMMON="--rm -v $WORKDIR:/home/stackage/work -w /home/stackage/work -v $BINDIR/stackage-curator:/usr/bin/stackage-curator:ro -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v $EXTRA_BIN_DIR:/home/stackage/bin:ro"
|
||||
ARGS_PREBUILD="$ARGS_COMMON -u $USER -v $CABAL_DIR:/home/stackage/.cabal -v $STACK_DIR:/home/stackage/.stack -v $GHC_DIR:/home/stackage/.ghc -v $DOT_STACKAGE_DIR:/home/stackage/.stackage"
|
||||
ARGS_BUILD="$ARGS_COMMON -v $CABAL_DIR:/home/stackage/.cabal:ro -v $STACK_DIR:/home/stackage/.stack:ro -v $GHC_DIR:/home/stackage/.ghc:ro"
|
||||
|
||||
# Get latest stack
|
||||
curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C $EXTRA_BIN_DIR '*/stack'
|
||||
|
||||
# Do all of the pre-build actions:
|
||||
#
|
||||
# * Update the package index
|
||||
# * Fetch all needed tarballs (the build step does not have write access to the tarball directory)
|
||||
# * Do a single unpack to create the package index cache (again due to directory perms)
|
||||
docker run $ARGS_PREBUILD $IMAGE /bin/bash -c "/home/stackage/bin/stack update && stackage-curator fetch --plan-file $PLAN_FILE && cd /tmp && /home/stackage/bin/stack unpack random"
|
||||
|
||||
# Now do the actual build. We need to first set the owner of the home directory
|
||||
# correctly, so we run the command as root, change owner, and then use sudo to
|
||||
# switch back to the current user
|
||||
docker run $ARGS_BUILD $IMAGE /bin/bash -c "chown $USER /home/stackage && sudo -E -u $USER env \"PATH=\$PATH:/home/stackage/bin\" stackage-curator make-bundle --plan-file $PLAN_FILE --docmap-file $DOCMAP_FILE --bundle-file $BUNDLE_FILE --target $TARGET --cabal-from-head"
|
||||
@ -1,24 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
CRONDIR=$(pwd)/crondir
|
||||
mkdir -p $CRONDIR
|
||||
source aws.sh
|
||||
|
||||
IMAGE=fpco/stackage-server-prod:latest
|
||||
docker pull $IMAGE
|
||||
|
||||
stack update
|
||||
|
||||
date
|
||||
echo "Running stackage-server-cron..."
|
||||
docker run --rm \
|
||||
-v $CRONDIR:/home/ubuntu \
|
||||
-v $HOME/.stack/indices:/home/ubuntu/.stack/indices:ro \
|
||||
--workdir /home/ubuntu \
|
||||
-p 17834:17834 \
|
||||
$IMAGE \
|
||||
bash -c "useradd $(whoami) -u $(id -u); sudo -u $(whoami) env HOME=/home/ubuntu AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY bash -c '/usr/local/bin/stackage-server-cron 2>&1 | tee -a /home/ubuntu/stackage-server-cron.log'"
|
||||
33
automated/dockerfiles/README.md
Normal file
33
automated/dockerfiles/README.md
Normal file
@ -0,0 +1,33 @@
|
||||
dockerfiles/stack-build
|
||||
=======================
|
||||
|
||||
Build [fpco/stack-build](https://hub.docker.com/r/fpco/stack-build/) Docker
|
||||
images. This script and its Dockerfiles are used for building images for LTS >=
|
||||
8.0.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
./build.sh [--push] [--dry-run] [--small] lts-X.Y"
|
||||
|
||||
Options
|
||||
-------
|
||||
|
||||
`--help`: show this help
|
||||
|
||||
`--push`: push the image after building/tagging it
|
||||
|
||||
`--dry-run`: print the important commands that will be run, but don't actually
|
||||
run them
|
||||
|
||||
`--small`: build the small variant of the image
|
||||
|
||||
Argument
|
||||
---------
|
||||
|
||||
The image for the selected LTS version will be built.
|
||||
|
||||
This searches for a Dockerfile for the selected snapshot in
|
||||
`lts-X.Y/Dockerfile`, and if one isn't found reuses the same image as built the
|
||||
most recent `lts-X.Y/Dockerfile` found for earlier minor versions of the same
|
||||
major version.
|
||||
171
automated/dockerfiles/build.sh
Executable file
171
automated/dockerfiles/build.sh
Executable file
@ -0,0 +1,171 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
#
|
||||
# Constants and defaults
|
||||
#
|
||||
|
||||
DOCKER_REPO=fpco/stack-build
|
||||
PUSH=false
|
||||
DRY=false
|
||||
VARIANT=build
|
||||
|
||||
#
|
||||
# Functions
|
||||
#
|
||||
|
||||
# Print usage information and exit with failure status. First argument is an
|
||||
# error message.
|
||||
usage() {
|
||||
echo "$0: $1" >&2
|
||||
echo
|
||||
echo "Usage: $0 [--push] [--dry-run] [--small] lts-X.Y]"
|
||||
echo "See README.md for more information."
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Print a command, and if --dry-run disabled also run it
|
||||
dry() {
|
||||
echo ">>> $*"
|
||||
[[ $DRY = true ]] || "$@"
|
||||
}
|
||||
|
||||
# Push an image if --push is enabled (otherwise do nothing)
|
||||
push() {
|
||||
[[ $PUSH = false ]] || dry docker push "$1"
|
||||
}
|
||||
|
||||
# Tag an image, and then push it if --push is enabled
|
||||
tagpush() {
|
||||
dry docker tag "$1" "$2"
|
||||
push "$2"
|
||||
}
|
||||
|
||||
#
|
||||
# Parse command-line
|
||||
#
|
||||
|
||||
LTS_SLUG_ARG=
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--push)
|
||||
PUSH=true
|
||||
shift
|
||||
;;
|
||||
--dry-run)
|
||||
DRY=true
|
||||
shift
|
||||
;;
|
||||
--small)
|
||||
VARIANT=small
|
||||
DOCKER_REPO=fpco/stack-build-small
|
||||
shift
|
||||
;;
|
||||
-*)
|
||||
usage "Unknown option: $1"
|
||||
;;
|
||||
*)
|
||||
if [[ -n "$LTS_SLUG_ARG" ]]; then
|
||||
usage "Cannot specify multiple snaphots: $1"
|
||||
fi
|
||||
LTS_SLUG_ARG="$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
case "$LTS_SLUG_ARG" in
|
||||
"")
|
||||
usage "Missing argument: snapshot"
|
||||
;;
|
||||
lts-*.*)
|
||||
LTS_SLUG="$LTS_SLUG_ARG"
|
||||
;;
|
||||
*)
|
||||
echo "$0: Wrong snapshot format: $LTS_SLUG_ARG" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Determine if lts slug is latest
|
||||
#
|
||||
|
||||
SNAPSHOTS="$(mktemp "lts-snapshots.json.XXXXXX")"
|
||||
trap "rm -f \"$SNAPSHOTS\"" EXIT
|
||||
wget -qO- https://www.stackage.org/download/lts-snapshots.json >"$SNAPSHOTS"
|
||||
|
||||
LTS_VERSION="${LTS_SLUG#lts-}"
|
||||
LTS_MAJOR="${LTS_VERSION%.*}"
|
||||
LTS_MINOR="${LTS_VERSION#*.}"
|
||||
|
||||
#
|
||||
# Determine latest LTS version
|
||||
#
|
||||
|
||||
mkdir -p $HOME/.local/bin
|
||||
curl -o $HOME/.local/bin/jq -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
|
||||
chmod +x $HOME/.local/bin/jq
|
||||
|
||||
LATEST_LTS_SLUG=$($HOME/.local/bin/jq -r ".[\"lts\"]" $SNAPSHOTS)
|
||||
LATEST_LTS_VERSION="${LATEST_LTS_SLUG#lts-}"
|
||||
LATEST_LTS_MAJOR="${LATEST_LTS_VERSION%.*}"
|
||||
LATEST_LTS_MINOR="${LATEST_LTS_VERSION#*.}"
|
||||
|
||||
#
|
||||
# Determine latest minor version of the selected major version
|
||||
#
|
||||
|
||||
MAJOR_LATEST_LTS_SLUG=$(jq -r ".[\"lts-$LTS_MAJOR\"]" $SNAPSHOTS)
|
||||
MAJOR_LATEST_LTS_VERSION="${MAJOR_LATEST_LTS_SLUG#lts-}"
|
||||
MAJOR_LATEST_LTS_MAJOR="${MAJOR_LATEST_LTS_VERSION%.*}"
|
||||
MAJOR_LATEST_LTS_MINOR="${MAJOR_LATEST_LTS_VERSION#*.}"
|
||||
|
||||
#
|
||||
# Find the Dockerfile for the selected snapshot
|
||||
#
|
||||
|
||||
if [[ -s "$LTS_SLUG/Dockerfile" ]]; then
|
||||
|
||||
# If there is an exact match, build and push that image
|
||||
|
||||
sed "s/\\\$DOCKER_REPO/$(echo $DOCKER_REPO|sed 's/\//\\\//')/g" "$LTS_SLUG/Dockerfile" >"$LTS_SLUG/Dockerfile.sub"
|
||||
dry docker build -t "$DOCKER_REPO:$LTS_SLUG" --build-arg "DOCKER_REPO=$DOCKER_REPO" --build-arg "LTS_SLUG=$LTS_SLUG" --build-arg "VARIANT=$VARIANT" -f "$LTS_SLUG/Dockerfile.sub" "$LTS_SLUG"
|
||||
rm -f "$LTS_SLUG/Dockerfile.sub"
|
||||
push "$DOCKER_REPO:$LTS_SLUG"
|
||||
else
|
||||
|
||||
# If no exact match, find a dockerfile for any earlier minor version of the
|
||||
# selected major version, and just create a new tag from version's image with the selected
|
||||
# minor version (assuming that nothing needs to change), and push it.
|
||||
|
||||
minor=$(( LTS_MINOR - 1 ))
|
||||
while [[ ! -s "lts-$LTS_MAJOR.$minor/Dockerfile" && $minor -ge 0 ]]; do
|
||||
minor=$(( minor - 1 ))
|
||||
done
|
||||
if [[ $minor -lt 0 ]]; then
|
||||
echo "$0: Cannot find any Dockerfile for LTS major version" >&2
|
||||
exit 1
|
||||
fi
|
||||
dry docker pull "$DOCKER_REPO:lts-$LTS_MAJOR.$minor" || true
|
||||
tagpush "$DOCKER_REPO:lts-$LTS_MAJOR.$minor" "$DOCKER_REPO:$LTS_SLUG"
|
||||
fi
|
||||
|
||||
#
|
||||
# Create and push additional tags
|
||||
#
|
||||
|
||||
# If we select the latest minor version for the selected major version, then
|
||||
# also create and push an 'lts-X' tag.
|
||||
if [[ $LTS_MINOR -ge $MAJOR_LATEST_LTS_MINOR ]]; then
|
||||
tagpush "$DOCKER_REPO:$LTS_SLUG" "$DOCKER_REPO:lts-$LTS_MAJOR"
|
||||
fi
|
||||
|
||||
# If we selected the latest LTS snapshot, also create and push the 'lts' and 'latest' tags.
|
||||
if [[ "$LTS_MAJOR" = "$LATEST_LTS_MAJOR" ]] && [[ $LTS_MINOR -ge $LATEST_LTS_MINOR ]]; then
|
||||
tagpush "$DOCKER_REPO:$LTS_SLUG" "$DOCKER_REPO:lts"
|
||||
tagpush "$DOCKER_REPO:$LTS_SLUG" "$DOCKER_REPO:latest"
|
||||
fi
|
||||
67
automated/dockerfiles/lts-10.0/Dockerfile
Normal file
67
automated/dockerfiles/lts-10.0/Dockerfile
Normal file
@ -0,0 +1,67 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
|
||||
|
||||
ARG GHC_VERSION=8.2.2
|
||||
ARG LTS_SLUG=lts-10.0
|
||||
ARG PID1_VERSION=0.1.0.1
|
||||
ARG STACK_VERSION=1.6.3
|
||||
ARG BOOTSTRAP_COMMIT=a8234cb586c3022099a3b0155275ed067df00f72
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.cabal/bin:/root/.local/bin:/opt/ghc/$GHC_VERSION/bin:$PATH
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget && \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Create symlink to help tools find GHC documentation
|
||||
#
|
||||
|
||||
RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --system-ghc --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
|
||||
cabal-install happy alex cpphs gtk2hs-buildtools hscolour && \
|
||||
cd $HOME/.stack && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/pid1%2F$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Install Stack
|
||||
#
|
||||
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
3
automated/dockerfiles/lts-10.1/Dockerfile
Normal file
3
automated/dockerfiles/lts-10.1/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM fpco/stack-build:lts-10.0
|
||||
ARG STACK_VERSION=1.6.3
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
3
automated/dockerfiles/lts-10.5/Dockerfile
Normal file
3
automated/dockerfiles/lts-10.5/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM fpco/stack-build:lts-10.0
|
||||
ARG STACK_VERSION=1.6.5
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
67
automated/dockerfiles/lts-11.0/Dockerfile
Normal file
67
automated/dockerfiles/lts-11.0/Dockerfile
Normal file
@ -0,0 +1,67 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
|
||||
|
||||
ARG GHC_VERSION=8.2.2
|
||||
ARG LTS_SLUG=lts-11.0
|
||||
ARG PID1_VERSION=0.1.0.1
|
||||
ARG STACK_VERSION=1.6.5
|
||||
ARG BOOTSTRAP_COMMIT=13ab2b86779c98598e96af7f4c4b9653ba280be5
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.cabal/bin:/root/.local/bin:/opt/ghc/$GHC_VERSION/bin:$PATH
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget && \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Create symlink to help tools find GHC documentation
|
||||
#
|
||||
|
||||
RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --system-ghc --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
|
||||
cabal-install happy alex cpphs gtk2hs-buildtools hscolour && \
|
||||
cd $HOME/.stack && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/pid1%2F$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Install Stack
|
||||
#
|
||||
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
3
automated/dockerfiles/lts-11.22/Dockerfile
Normal file
3
automated/dockerfiles/lts-11.22/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM fpco/stack-build:lts-11.6
|
||||
ARG STACK_VERSION=1.9.3
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
3
automated/dockerfiles/lts-11.6/Dockerfile
Normal file
3
automated/dockerfiles/lts-11.6/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM fpco/stack-build:lts-11.5
|
||||
ARG STACK_VERSION=1.7.1
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
69
automated/dockerfiles/lts-12.0/Dockerfile
Normal file
69
automated/dockerfiles/lts-12.0/Dockerfile
Normal file
@ -0,0 +1,69 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
|
||||
|
||||
ARG GHC_VERSION=8.4.3
|
||||
ARG LTS_SLUG=lts-12.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=1.7.1
|
||||
ARG CUDA_VERSION=8.0
|
||||
ARG BOOTSTRAP_COMMIT=56c62ccbf31229ee2b09d3a0b4cd2ad94e7406a8
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
LD_LIBRARY_PATH=/usr/local/cuda-$CUDA_VERSION/lib64:/usr/local/cuda-$CUDA_VERSION/nvvm/lib64
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget && \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Create symlink to help tools find GHC documentation
|
||||
#
|
||||
|
||||
RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --system-ghc --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
|
||||
cabal-install happy alex cpphs gtk2hs-buildtools hscolour && \
|
||||
cd $HOME/.stack && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Install Stack
|
||||
#
|
||||
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
3
automated/dockerfiles/lts-12.13/Dockerfile
Normal file
3
automated/dockerfiles/lts-12.13/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM fpco/stack-build:lts-12.0
|
||||
ARG STACK_VERSION=1.9.1
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
14
automated/dockerfiles/lts-12.15/Dockerfile
Normal file
14
automated/dockerfiles/lts-12.15/Dockerfile
Normal file
@ -0,0 +1,14 @@
|
||||
FROM fpco/stack-build:lts-12.0
|
||||
ARG STACK_VERSION=1.9.1
|
||||
ARG GHC_VERSION=8.4.4
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
ghc-$GHC_VERSION \
|
||||
ghc-$GHC_VERSION-dyn \
|
||||
ghc-$GHC_VERSION-htmldocs \
|
||||
ghc-$GHC_VERSION-prof && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
RUN ln -s ghc-$GHC_VERSION /opt/ghc/$GHC_VERSION/share/doc/ghc
|
||||
ARG CUDA_VERSION=8.0
|
||||
ENV PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
3
automated/dockerfiles/lts-12.21/Dockerfile
Normal file
3
automated/dockerfiles/lts-12.21/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM fpco/stack-build:lts-12.15
|
||||
ARG STACK_VERSION=1.9.3
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
89
automated/dockerfiles/lts-12.26/Dockerfile
Normal file
89
automated/dockerfiles/lts-12.26/Dockerfile
Normal file
@ -0,0 +1,89 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
|
||||
|
||||
ARG GHC_VERSION=8.4.4
|
||||
ARG LTS_SLUG=lts-12.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=1.9.3
|
||||
ARG CUDA_VERSION=8.0
|
||||
ARG BOOTSTRAP_COMMIT=7f982f63a3734ddb2a7cbbc52b8cec983c496efa
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
LD_LIBRARY_PATH=/usr/local/cuda-$CUDA_VERSION/lib64:/usr/local/cuda-$CUDA_VERSION/nvvm/lib64
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends wget netbase ca-certificates && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
echo "deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
|
||||
echo "deb-src http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 063DAB2BDC0B3F9FCEBC378BFF3AEACEF6F88286 && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ghc-$GHC_VERSION ghc-$GHC_VERSION-htmldocs \
|
||||
g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg \
|
||||
libtinfo-dev; \
|
||||
else \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Create symlink to help tools find GHC documentation
|
||||
#
|
||||
|
||||
RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
|
||||
|
||||
#
|
||||
# Install Stack
|
||||
#
|
||||
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN export STACK_ROOT=/usr/local/lib/stack && \
|
||||
stack --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
|
||||
cabal-install happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
69
automated/dockerfiles/lts-13.0/Dockerfile
Normal file
69
automated/dockerfiles/lts-13.0/Dockerfile
Normal file
@ -0,0 +1,69 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
|
||||
|
||||
ARG GHC_VERSION=8.6.3
|
||||
ARG LTS_SLUG=lts-13.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=1.9.3
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG BOOTSTRAP_COMMIT=26b29f2862462afd47fb916ed0a2c2a6844ebca9
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
LD_LIBRARY_PATH=/usr/local/cuda-$CUDA_VERSION/lib64:/usr/local/cuda-$CUDA_VERSION/nvvm/lib64
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget && \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Create symlink to help tools find GHC documentation
|
||||
#
|
||||
|
||||
RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --system-ghc --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
|
||||
cabal-install happy alex cpphs gtk2hs-buildtools hscolour && \
|
||||
cd $HOME/.stack && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Install Stack
|
||||
#
|
||||
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
93
automated/dockerfiles/lts-13.12/Dockerfile
Normal file
93
automated/dockerfiles/lts-13.12/Dockerfile
Normal file
@ -0,0 +1,93 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
|
||||
|
||||
ARG GHC_VERSION=8.6.4
|
||||
ARG LTS_SLUG=lts-13.11
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=1.9.3
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG BOOTSTRAP_COMMIT=9f2b7ab95c711794257b059604e80ab9ad3c0c45
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
LD_LIBRARY_PATH=/usr/local/cuda-$CUDA_VERSION/lib64:/usr/local/cuda-$CUDA_VERSION/nvvm/lib64
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends wget netbase ca-certificates && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
echo "deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
|
||||
echo "deb-src http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 063DAB2BDC0B3F9FCEBC378BFF3AEACEF6F88286 && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ghc-$GHC_VERSION ghc-$GHC_VERSION-htmldocs \
|
||||
g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg \
|
||||
libtinfo-dev; \
|
||||
else \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.3$/GHCVER=$GHC_VERSION/" | bash && \
|
||||
# Add g++ version required for building 'double-conversion' \
|
||||
# (see https://github.com/commercialhaskell/stack/issues/4470) \
|
||||
apt-get install -y g++-7; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Create symlink to help tools find GHC documentation
|
||||
#
|
||||
|
||||
RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
|
||||
|
||||
#
|
||||
# Install Stack
|
||||
#
|
||||
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN export STACK_ROOT=/usr/local/lib/stack && \
|
||||
stack --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
|
||||
cabal-install happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
93
automated/dockerfiles/lts-13.20/Dockerfile
Normal file
93
automated/dockerfiles/lts-13.20/Dockerfile
Normal file
@ -0,0 +1,93 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
|
||||
|
||||
ARG GHC_VERSION=8.6.5
|
||||
ARG LTS_SLUG=lts-13.20
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=1.9.3
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG BOOTSTRAP_COMMIT=9f2b7ab95c711794257b059604e80ab9ad3c0c45
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.cabal/bin:/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
LD_LIBRARY_PATH=/usr/local/cuda-$CUDA_VERSION/lib64:/usr/local/cuda-$CUDA_VERSION/nvvm/lib64
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends wget netbase ca-certificates && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
echo "deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
|
||||
echo "deb-src http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >>/etc/apt/sources.list && \
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 063DAB2BDC0B3F9FCEBC378BFF3AEACEF6F88286 && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ghc-$GHC_VERSION ghc-$GHC_VERSION-htmldocs \
|
||||
g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg \
|
||||
libtinfo-dev; \
|
||||
else \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.3$/GHCVER=$GHC_VERSION/" | bash && \
|
||||
# Add g++ version required for building 'double-conversion' \
|
||||
# (see https://github.com/commercialhaskell/stack/issues/4470) \
|
||||
apt-get install -y g++-7; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Create symlink to help tools find GHC documentation
|
||||
#
|
||||
|
||||
RUN ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION
|
||||
|
||||
#
|
||||
# Install Stack
|
||||
#
|
||||
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN export STACK_ROOT=/usr/local/lib/stack && \
|
||||
stack --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
|
||||
cabal-install happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
3
automated/dockerfiles/lts-13.25/Dockerfile
Normal file
3
automated/dockerfiles/lts-13.25/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM $DOCKER_REPO:lts-13.24
|
||||
ARG STACK_VERSION=2.1.1
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
9
automated/dockerfiles/lts-13.27/Dockerfile
Normal file
9
automated/dockerfiles/lts-13.27/Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM $DOCKER_REPO:lts-13.26
|
||||
ARG VARIANT
|
||||
RUN if [ "$VARIANT" = "small" ]; then \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends sudo && \
|
||||
rm -rf /var/lib/apt/lists/*; \
|
||||
fi
|
||||
ARG STACK_VERSION=2.1.3
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64-static.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
10
automated/dockerfiles/lts-13.3/Dockerfile
Normal file
10
automated/dockerfiles/lts-13.3/Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM fpco/stack-build:lts-13.0
|
||||
|
||||
#
|
||||
# Add g++ version required for building 'double-conversion'
|
||||
# (see https://github.com/commercialhaskell/stack/issues/4470)
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y g++-7 && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
89
automated/dockerfiles/lts-14.0/Dockerfile
Normal file
89
automated/dockerfiles/lts-14.0/Dockerfile
Normal file
@ -0,0 +1,89 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=8.6.5
|
||||
ARG LTS_SLUG=lts-14.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.1.3
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_VERSION=3.9
|
||||
ARG BOOTSTRAP_COMMIT=d4143f1845f26e8e99d0a1a8134d6ff535ab98b2
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
ARG STACK_ROOT=/home/stackage/.stack
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:$STACK_ROOT/programs/x86_64-linux/ghc-$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
CPATH=$JVM_PATH/include:$JVM_PATH/include/linux:/usr/lib/llvm-$LLVM_VERSION/include
|
||||
|
||||
#
|
||||
# Install pre-requisites
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
wget netbase ca-certificates g++ gcc libc6-dev libffi-dev libgmp-dev \
|
||||
make xz-utils zlib1g-dev git gnupg libtinfo-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
# Re-installs 'stack' *after* running debian-bootstrap.sh since that may have
|
||||
# installed a different version.
|
||||
# In the case of 'small' image, just install Stack and GHC.
|
||||
#
|
||||
|
||||
RUN if [ "$VARIANT" != "small" ]; then \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.5$/GHCVER=$GHC_VERSION/" | GHCVER=$GHC_VERSION bash; \
|
||||
fi && \
|
||||
wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/bin '*/stack' && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
stack setup --resolver ghc-$GHC_VERSION; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --resolver=$LTS_SLUG --local-bin-path=/usr/bin install \
|
||||
happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -and -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
89
automated/dockerfiles/lts-14.0/Dockerfile.sub
Normal file
89
automated/dockerfiles/lts-14.0/Dockerfile.sub
Normal file
@ -0,0 +1,89 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=8.6.5
|
||||
ARG LTS_SLUG=lts-14.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.1.3
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_VERSION=3.9
|
||||
ARG BOOTSTRAP_COMMIT=d4143f1845f26e8e99d0a1a8134d6ff535ab98b2
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
ARG STACK_ROOT=/home/stackage/.stack
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:$STACK_ROOT/programs/x86_64-linux/ghc-$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
CPATH=$JVM_PATH/include:$JVM_PATH/include/linux:/usr/lib/llvm-$LLVM_VERSION/include
|
||||
|
||||
#
|
||||
# Install pre-requisites
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
wget netbase ca-certificates g++ gcc libc6-dev libffi-dev libgmp-dev \
|
||||
make xz-utils zlib1g-dev git gnupg libtinfo-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
# Re-installs 'stack' *after* running debian-bootstrap.sh since that may have
|
||||
# installed a different version.
|
||||
# In the case of 'small' image, just install Stack and GHC.
|
||||
#
|
||||
|
||||
RUN if [ "$VARIANT" != "small" ]; then \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.5$/GHCVER=$GHC_VERSION/" | GHCVER=$GHC_VERSION bash; \
|
||||
fi && \
|
||||
wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/bin '*/stack' && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
stack setup --resolver ghc-$GHC_VERSION; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --resolver=$LTS_SLUG --local-bin-path=/usr/bin install \
|
||||
happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -and -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
89
automated/dockerfiles/lts-15.0/Dockerfile
Normal file
89
automated/dockerfiles/lts-15.0/Dockerfile
Normal file
@ -0,0 +1,89 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=8.8.2
|
||||
ARG LTS_SLUG=lts-15.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.1.3
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_PATH=/usr/lib/llvm-7
|
||||
ARG BOOTSTRAP_COMMIT=77790c7bcb21fd8875871245df5c5c39a55ec0c1
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
ARG STACK_ROOT=/home/stackage/.stack
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:$STACK_ROOT/programs/x86_64-linux/ghc-$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
CPATH=$JVM_PATH/include:$JVM_PATH/include/linux:$LLVM_PATH/include
|
||||
|
||||
#
|
||||
# Install pre-requisites
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
wget netbase ca-certificates g++ gcc libc6-dev libffi-dev libgmp-dev \
|
||||
make xz-utils zlib1g-dev git gnupg libtinfo-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
# Re-installs 'stack' *after* running debian-bootstrap.sh since that may have
|
||||
# installed a different version.
|
||||
# In the case of 'small' image, just install Stack and GHC.
|
||||
#
|
||||
|
||||
RUN if [ "$VARIANT" != "small" ]; then \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.5$/GHCVER=$GHC_VERSION/" | GHCVER=$GHC_VERSION bash; \
|
||||
fi && \
|
||||
wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/bin '*/stack' && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
stack setup --resolver ghc-$GHC_VERSION; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --resolver=$LTS_SLUG --local-bin-path=/usr/bin install \
|
||||
happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -and -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
3
automated/dockerfiles/lts-15.10/Dockerfile
Normal file
3
automated/dockerfiles/lts-15.10/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM $DOCKER_REPO:lts-15.5
|
||||
ARG STACK_VERSION=2.3.1
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
89
automated/dockerfiles/lts-15.5/Dockerfile
Normal file
89
automated/dockerfiles/lts-15.5/Dockerfile
Normal file
@ -0,0 +1,89 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
LABEL maintainer="manny@fpcomplete.com"
|
||||
|
||||
ARG GHC_VERSION=8.8.3
|
||||
ARG LTS_SLUG=lts-15.0
|
||||
ARG PID1_VERSION=0.1.2.0
|
||||
ARG STACK_VERSION=2.1.3
|
||||
ARG CUDA_VERSION=10.0
|
||||
ARG JVM_PATH=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ARG LLVM_PATH=/usr/lib/llvm-7
|
||||
ARG BOOTSTRAP_COMMIT=77790c7bcb21fd8875871245df5c5c39a55ec0c1
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VARIANT=build
|
||||
ARG STACK_ROOT=/home/stackage/.stack
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.local/bin:/usr/local/cuda-$CUDA_VERSION/bin:$STACK_ROOT/programs/x86_64-linux/ghc-$GHC_VERSION/bin:$PATH \
|
||||
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
|
||||
CPATH=$JVM_PATH/include:$JVM_PATH/include/linux:$LLVM_PATH/include
|
||||
|
||||
#
|
||||
# Install pre-requisites
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
wget netbase ca-certificates g++ gcc libc6-dev libffi-dev libgmp-dev \
|
||||
make xz-utils zlib1g-dev git gnupg libtinfo-dev jq && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
# Re-installs 'stack' *after* running debian-bootstrap.sh since that may have
|
||||
# installed a different version.
|
||||
# In the case of 'small' image, just install Stack and GHC.
|
||||
#
|
||||
|
||||
RUN if [ "$VARIANT" != "small" ]; then \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | sed "s/^GHCVER=8.6.5$/GHCVER=$GHC_VERSION/" | GHCVER=$GHC_VERSION bash; \
|
||||
fi && \
|
||||
wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/bin '*/stack' && \
|
||||
if [ "$VARIANT" = "small" ]; then \
|
||||
stack setup --resolver ghc-$GHC_VERSION; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Configure Stack to use the GHC installed in the Docker image rather than installing its own
|
||||
#
|
||||
|
||||
RUN mkdir /etc/stack/ && \
|
||||
echo "system-ghc: true" >/etc/stack/config.yaml
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --resolver=$LTS_SLUG --local-bin-path=/usr/bin install \
|
||||
happy alex cpphs gtk2hs-buildtools hscolour hlint hindent && \
|
||||
cd $STACK_ROOT && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -and -not -path "./programs/x86_64-linux/ghc-$GHC_VERSION/*" -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/v$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
55
automated/dockerfiles/lts-9.0/Dockerfile
Normal file
55
automated/dockerfiles/lts-9.0/Dockerfile
Normal file
@ -0,0 +1,55 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER Emanuel Borsboom <manny@fpcomplete.com>
|
||||
|
||||
ARG GHC_VERSION=8.0.2
|
||||
ARG LTS_SLUG=lts-9.0
|
||||
ARG PID1_VERSION=0.1.0.1
|
||||
ARG BOOTSTRAP_COMMIT=1bc67bb54eda08c90d8421bc11d257354a379d11
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
#
|
||||
# Set encoding to UTF-8 and PATH to find GHC and cabal/stack-installed binaries.
|
||||
#
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PATH=/root/.cabal/bin:/root/.local/bin:/opt/ghc/$GHC_VERSION/bin:$PATH
|
||||
|
||||
#
|
||||
# Use Stackage's debian-bootstrap.sh script to install system libraries and
|
||||
# tools required to build any Stackage package.
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget && \
|
||||
wget -qO- https://raw.githubusercontent.com/fpco/stackage/$BOOTSTRAP_COMMIT/debian-bootstrap.sh | bash && \
|
||||
ln -s ghc /opt/ghc/$GHC_VERSION/share/doc/ghc-$GHC_VERSION && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#
|
||||
# Use 'stack' to install basic Haskell tools like alex, happy, and cpphs. We
|
||||
# remove most of the STACK_ROOT afterward to save space, but keep the 'share'
|
||||
# files that some of these tools require.
|
||||
#
|
||||
|
||||
RUN stack --system-ghc --resolver=$LTS_SLUG --local-bin-path=/usr/local/bin install \
|
||||
cabal-install happy alex cpphs gtk2hs-buildtools hscolour && \
|
||||
cd $HOME/.stack && \
|
||||
find . -type f -not -path './snapshots/*/share/*' -exec rm '{}' \; && \
|
||||
find . -type d -print0 |sort -rz |xargs -0 rmdir 2>/dev/null || true
|
||||
|
||||
#
|
||||
# Install proper 'pid1' init daemon
|
||||
#
|
||||
|
||||
RUN wget -O- "https://github.com/fpco/pid1/releases/download/pid1%2F$PID1_VERSION/pid1-$PID1_VERSION-linux-x86_64.tar.gz" | tar xzf - -C /usr/local && \
|
||||
chown root:root /usr/local/sbin && \
|
||||
chown root:root /usr/local/sbin/pid1
|
||||
|
||||
#
|
||||
# Set up pid1 entrypoint and default command
|
||||
#
|
||||
|
||||
ENTRYPOINT ["/usr/local/sbin/pid1"]
|
||||
CMD ["bash"]
|
||||
3
automated/dockerfiles/lts-9.20/Dockerfile
Normal file
3
automated/dockerfiles/lts-9.20/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM fpco/stack-build:lts-9.0
|
||||
ARG STACK_VERSION=1.6.1
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
3
automated/dockerfiles/lts-9.21/Dockerfile
Normal file
3
automated/dockerfiles/lts-9.21/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM fpco/stack-build:lts-9.0
|
||||
ARG STACK_VERSION=1.6.5
|
||||
RUN wget -qO- https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
|
||||
@ -1,35 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
if [[ ! -f convert ]]
|
||||
then
|
||||
curl https://s3.amazonaws.com/www.snoyman.com/convert-old-stackage-c9c4d06b31cb7aafedd23aa316b8008c45e4d4dd.bz2 > convert.bz2
|
||||
chmod +x convert.bz2
|
||||
bunzip2 convert.bz2
|
||||
fi
|
||||
|
||||
cd $(dirname ${BASH_SOURCE[0]})
|
||||
|
||||
for d in lts-haskell stackage-nightly stackage-snapshots
|
||||
do
|
||||
if [[ ! -d "$d" ]]
|
||||
then
|
||||
git clone https://github.com/commercialhaskell/$d
|
||||
else
|
||||
(cd "$d" && git pull || echo "Git pull failed, ignoring")
|
||||
fi
|
||||
done
|
||||
|
||||
(
|
||||
export HOME=$(pwd)
|
||||
./convert
|
||||
)
|
||||
|
||||
cd stackage-snapshots
|
||||
git add lts nightly
|
||||
git diff-index --quiet HEAD && echo No changes && exit 0
|
||||
git config user.name "Stackage build server"
|
||||
git config user.email "michael@snoyman.com"
|
||||
git commit -m "More conversions $(date)"
|
||||
GIT_SSH_COMMAND='ssh -i ../../ssh-lts/id_rsa' git push git@github.com:commercialhaskell/stackage-snapshots master
|
||||
@ -1,5 +0,0 @@
|
||||
# Building Stackage with Nix
|
||||
|
||||
The script `build.sh` is supposed to be run in a directory where `curator unpack`
|
||||
was run - it assumes existence of `unpack-dir` directory with a Stackage
|
||||
snapshot `stack.yaml` and unpacked packages in it.
|
||||
@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu +x
|
||||
|
||||
NIX_VERSION="2.0.4"
|
||||
curl https://nixos.org/releases/nix/nix-$NIX_VERSION/install | sh
|
||||
|
||||
# no code to install stack2nix yet
|
||||
|
||||
stack2nix --cabal2nix-args="--no-hpack" unpack-dir > snapshot.nix
|
||||
|
||||
nix build -f snapshot-fixed.nix
|
||||
@ -1,23 +0,0 @@
|
||||
let
|
||||
spec = builtins.fromJSON (builtins.readFile ./nixpkgs-src.json);
|
||||
src = import <nix/fetchurl.nix> {
|
||||
url = "https://github.com/${spec.owner}/${spec.repo}/archive/${spec.rev}.tar.gz";
|
||||
inherit (spec) sha256;
|
||||
};
|
||||
nixcfg = import <nix/config.nix>;
|
||||
in builtins.derivation {
|
||||
system = builtins.currentSystem;
|
||||
name = "${src.name}-unpacked";
|
||||
builder = builtins.storePath nixcfg.shell;
|
||||
inherit src;
|
||||
args = [
|
||||
(builtins.toFile "builder" ''
|
||||
$coreutils/mkdir $out
|
||||
cd $out
|
||||
$gzip -d < $src | $tar -x --strip-components=1
|
||||
'')
|
||||
];
|
||||
coreutils = builtins.storePath nixcfg.coreutils;
|
||||
tar = builtins.storePath nixcfg.tar;
|
||||
gzip = builtins.storePath nixcfg.gzip;
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
{
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c2950341d038995bf46a7b72db961bb3d3e9ac12",
|
||||
"sha256": "0ghirjm6xvsihci3fladrn4nrnh2yr529v7c406hmw0yp25kv0i4"
|
||||
}
|
||||
@ -1,41 +0,0 @@
|
||||
{ pkgs ? import (import ./fetch-nixpkgs.nix) {}
|
||||
, compiler ? pkgs.haskell.packages.ghc863
|
||||
}:
|
||||
let
|
||||
snapshot = import ./snapshot.nix { pkgs = pkgs; compiler = compiler; };
|
||||
in
|
||||
snapshot.override (with pkgs.haskell.lib; {
|
||||
overrides = self: super: {
|
||||
# disabling packages from non-hackage-packages.nix
|
||||
futhark = null;
|
||||
multi-ghc-travis = null;
|
||||
vaultenv = null;
|
||||
# native deps
|
||||
check-email = super.check-email.override { resolv = null; };
|
||||
flac = super.flac.override { FLAC = pkgs.flac; };
|
||||
freenect = super.freenect.override { freenect_sync = null; libfreenect = null; };
|
||||
haskell-gi = super.haskell-gi.override { gobject-introspection = pkgs.gnome3.gobjectIntrospection; };
|
||||
HDBC-mysql = super.HDBC-mysql.override { mysqlclient = pkgs.mysql;};
|
||||
libffi = super.libffi.override { ffi = null; };
|
||||
# fixes
|
||||
blas-ffi = overrideCabal super.blas-ffi (
|
||||
old: { libraryPkgconfigDepends = old.libraryPkgconfigDepends ++ [ pkgs.openblasCompat ]; }
|
||||
);
|
||||
odbc = overrideCabal super.odbc (
|
||||
old: { librarySystemDepends = old.librarySystemDepends ++ [ pkgs.freetds ]; }
|
||||
);
|
||||
html-entities = null; # https://github.com/nikita-volkov/html-entities/issues/8
|
||||
category = null; # conflict in Prelude.hs
|
||||
constraint = null; # because of category
|
||||
lame = null; # fails with 'Total ticks: 451489'
|
||||
proto-lens-protobuf-types = overrideCabal super.proto-lens-protobuf-types (
|
||||
old: { libraryToolDepends = old.libraryToolDepends ++ [ pkgs.protobuf ]; }
|
||||
);
|
||||
# libraft = null; # xxx/postgres/entries.sql: openFile: does not exist (No such file or directory) in libraft-0.2.0.0
|
||||
xmlbf-xeno = null; # because of html-entities
|
||||
xmonad = null; # xmonad requires extra patches for Nix
|
||||
xmonad-contrib = null;
|
||||
xmonad-extras = null;
|
||||
hlibgit2 = disableHardening super.hlibgit2 [ "format" ];
|
||||
};
|
||||
})
|
||||
@ -3,12 +3,9 @@
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
while true; do
|
||||
./build-next.sh nightly-$(date -u +%F)
|
||||
./build.sh nightly-$(date -u +%F)
|
||||
date
|
||||
|
||||
#./new-stackage-format/convert.sh > /dev/null 2> /dev/null
|
||||
#date
|
||||
|
||||
sleep 30m
|
||||
echo
|
||||
done
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -17,9 +17,19 @@ mkdir -p /home/stackage
|
||||
export LANG=C.UTF-8
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Get curl
|
||||
# Get curl and unzip
|
||||
apt-get update
|
||||
apt-get install -y curl
|
||||
apt-get install -y curl unzip
|
||||
|
||||
# Install AWS CLI
|
||||
mkdir -p /tmp/awscli
|
||||
(
|
||||
cd /tmp/awscli
|
||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
||||
unzip awscliv2.zip
|
||||
./aws/install --bin-dir /usr/bin
|
||||
)
|
||||
rm -rf /tmp/awscli
|
||||
|
||||
# Get Stack and GHC
|
||||
curl -sSL https://get.haskellstack.org/ | sh -s - -d /usr/bin
|
||||
@ -52,6 +62,8 @@ apt-get install -y \
|
||||
libclang-3.9-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libcwiid-dev \
|
||||
libdbusmenu-glib-dev \
|
||||
libdbusmenu-gtk3-dev \
|
||||
libdevil-dev \
|
||||
libedit-dev \
|
||||
libedit2 \
|
||||
@ -66,6 +78,7 @@ apt-get install -y \
|
||||
libglu1-mesa-dev \
|
||||
libgmp3-dev \
|
||||
libgnutls28-dev \
|
||||
libgraphene-1.0-dev \
|
||||
libgsasl7-dev \
|
||||
libgsl-dev \
|
||||
libgtk-3-dev \
|
||||
@ -89,13 +102,13 @@ apt-get install -y \
|
||||
libmono-2.0-dev \
|
||||
libmp3lame-dev \
|
||||
libmpfr-dev \
|
||||
libmpich-dev \
|
||||
libmysqlclient-dev \
|
||||
libncurses5-dev \
|
||||
libnfc-dev \
|
||||
liboath-dev \
|
||||
libnotify-dev \
|
||||
libopenal-dev \
|
||||
libopenmpi-dev \
|
||||
libpango1.0-dev \
|
||||
libpcap0.8-dev \
|
||||
libpcre2-dev \
|
||||
|
||||
@ -11,11 +11,8 @@ export PATH=$HOME/.local/bin:$PATH
|
||||
curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
|
||||
|
||||
# Get new Stackage curator
|
||||
CURATOR2=stackage-curator-2-f6258124cff9a7e92bcb5704164a70e149080e88
|
||||
wget "https://download.fpcomplete.com/stackage-curator-2/$CURATOR2.bz2"
|
||||
bunzip2 "$CURATOR2.bz2"
|
||||
chmod +x $CURATOR2
|
||||
mv $CURATOR2 ~/.local/bin/stackage-curator-2
|
||||
curl -L "https://download.fpcomplete.com/stackage-curator-2/curator-85b021a53833ff310fc66b3fdc5ca3f7828ce18b.bz2" | bunzip2 > curator
|
||||
chmod +x curator
|
||||
|
||||
# Install GHC
|
||||
stack setup $GHCVER
|
||||
@ -24,8 +21,8 @@ stack setup $GHCVER
|
||||
# because of a different constraints handling in minor LTS version bumps
|
||||
NIGHTLY="nightly-$(date +%Y-%m-%d)"
|
||||
# New curator check
|
||||
stackage-curator-2 update &&
|
||||
stackage-curator-2 constraints --target=$NIGHTLY &&
|
||||
stackage-curator-2 snapshot-incomplete &&
|
||||
stackage-curator-2 snapshot &&
|
||||
stack --resolver ghc-$GHCVER exec stackage-curator-2 check-snapshot
|
||||
./curator update &&
|
||||
./curator constraints --target=$NIGHTLY &&
|
||||
./curator snapshot-incomplete --target=$NIGHTLY &&
|
||||
./curator snapshot &&
|
||||
stack --resolver ghc-$GHCVER exec ./curator check-snapshot
|
||||
@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
export GHCVER=8.8.1
|
||||
|
||||
# Download and unpack the stack executable
|
||||
mkdir -p ~/.local/bin
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
|
||||
|
||||
# Get stackage-curator
|
||||
wget https://s3.amazonaws.com/stackage-travis/stackage-curator/stackage-curator.bz2
|
||||
bunzip2 stackage-curator.bz2
|
||||
chmod +x stackage-curator
|
||||
mv stackage-curator ~/.local/bin
|
||||
|
||||
# Install GHC
|
||||
stack setup $GHCVER
|
||||
|
||||
# Update the index
|
||||
stack update
|
||||
|
||||
# Check
|
||||
exec stack --resolver ghc-$GHCVER exec stackage-curator check
|
||||
Loading…
Reference in New Issue
Block a user