mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-11 14:58:29 +01:00
Upgrade docker image to ubuntu 20.04
This commit is contained in:
parent
eacede90c5
commit
431c2b0933
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,7 +1,7 @@
|
||||
Checklist:
|
||||
- [ ] Meaningful commit message, eg `add my-cool-package` (please don't mention `build-constraints.yml`)
|
||||
- [ ] At least 30 minutes have passed since uploading to Hackage
|
||||
- [ ] If applicable, required system libraries are added to [debian-bootstrap.sh](https://github.com/commercialhaskell/stackage/blob/master/debian-bootstrap.sh)
|
||||
- [ ] If applicable, required system libraries are added to [02-apt-get-install.sh](https://github.com/commercialhaskell/stackage/blob/master/docker/02-apt-get-install.sh) or [03-custom-install.sh](https://github.com/commercialhaskell/stackage/blob/master/docker/03-custom-install.sh)
|
||||
- [ ] (optional) Package is compatible with the latest version of all dependencies (Run `cabal update && cabal outdated`)
|
||||
- [ ] (optional) Package have been verified to work with the latest nightly snapshot, e.g by running the [verify-package script](https://github.com/commercialhaskell/stackage/blob/master/verify-package)
|
||||
|
||||
|
||||
17
CURATORS.md
17
CURATORS.md
@ -21,10 +21,10 @@ process works:
|
||||
* [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
|
||||
* Docker builds [builds](https://github.com/commercialhaskell/stackage/actions/workflows/image.yml)
|
||||
* The stackage-build server (described below) is able to run automated builds using the [build.sh script](https://github.com/commercialhaskell/stackage/blob/master/automated/build.sh)
|
||||
* When a new Nightly build is completed, it is uploaded to [the nightly repo](https://github.com/commercialhaskell/stackage-nightly)
|
||||
* Once a week, we run an LTS minor bump. Instead of using build-constraints.yaml, that job takes the previous LTS release, turns it into constraints, and then bumps the version numbers to the latest on Hackage, in accordance with the version bounds in the build plan. This plans are uploaded to [the LTS repo](https://github.com/commercialhaskell/lts-haskell)
|
||||
* When a new (nightly or LTS) build is completed, it is uploaded to [stackage-snapshots](https://github.com/commercialhaskell/stackage-snapshots)
|
||||
* Once a week, we run an LTS minor bump. Instead of using build-constraints.yaml, that job takes the previous LTS release, turns it into `^>=` constraints, and then bumps the version numbers to the latest on Hackage, in accordance with the generated constraint.
|
||||
* Cutting a new LTS major release is essentially just a Stackage Nightly that gets rebuilt and uploaded as an LTS
|
||||
|
||||
## Pull requests
|
||||
@ -187,9 +187,9 @@ the maintainers of those packages.
|
||||
## Updating the content of the Docker image used for building
|
||||
|
||||
### Adding Debian packages for required system tools or libraries
|
||||
Additional (non-Haskell) system libraries or tools should be added to `stackage/debian-bootstrap.sh`.
|
||||
Additional (non-Haskell) system libraries or tools should be added to `docker/02-apt-get-install.sh` or `docker/03-custom-install.sh`.
|
||||
After you've committed those changes, merging them into the `nightly` branch should
|
||||
trigger a DockerHub build. Simply run:
|
||||
trigger an image build. Simply run:
|
||||
|
||||
```bash
|
||||
$ git checkout nightly
|
||||
@ -197,6 +197,8 @@ trigger a DockerHub build. Simply run:
|
||||
$ git push
|
||||
```
|
||||
|
||||
This will [trigger a build](https://github.com/commercialhaskell/stackage/actions/workflows/image.yml).
|
||||
|
||||
Use [Ubuntu Package content search](http://packages.ubuntu.com/) to determine which package provides particular dev files (it defaults to xenial which is the version used to build Nightly).
|
||||
|
||||
Note that we generally don't install/run services needed for testsuites in the docker images - packages with tests requiring some system service can be added to `expected-test-failures`.
|
||||
@ -204,6 +206,7 @@ It's good to inform the maintainer of any disabled tests (commenting in the PR i
|
||||
|
||||
If a new package fails to build because of missing system libraries we often ask the maintainer to help figure out what to install.
|
||||
|
||||
|
||||
### Upgrading GHC version
|
||||
The Dockerfile contains information on which GHC versions should be used. You
|
||||
can modify it and push it to Github to trigger a build. The nightly
|
||||
@ -214,14 +217,14 @@ Update the `Win32` version in `build-constraints.yaml` under "GHC upper bounds".
|
||||
|
||||
Note that when starting a new LTS major release, you'll need to modify `.github/workflows/image.yml` to add a new lts branch.
|
||||
|
||||
Update `GHCVER` in `Dockerfile`. (This env var automatically gets passed to `debian-bootstrap.sh`.)
|
||||
Update `GHCVER` in `Dockerfile`. (This env var automatically gets passed to the scripts in `docker/`).
|
||||
|
||||
Ensure that the [global-hints.yaml
|
||||
file](https://github.com/fpco/stackage-content/blob/master/stack/global-hints.yaml)
|
||||
is updated with information on the latest GHC release by cloning that
|
||||
repo and running `./update-global-hints.hs ghc-X.Y.Z`.
|
||||
|
||||
If enountering an error like the following, this means that the Stack metadata
|
||||
If enountering an error like the following, this means that the [Stack metadata](https://github.com/commercialhaskell/stackage-content)
|
||||
has not yet been updated, so wait some time until this happens:
|
||||
|
||||
```
|
||||
|
||||
17
Dockerfile
17
Dockerfile
@ -1,15 +1,24 @@
|
||||
FROM fpco/pid1:18.04
|
||||
FROM fpco/pid1:20.04
|
||||
|
||||
ENV HOME /home/stackage
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV GHCVER 9.2.2
|
||||
|
||||
# NOTE: also update debian-bootstrap.sh when cuda version changes
|
||||
# NOTE: also update docker/03-custom-install.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
|
||||
# ENV CUDA_PATH /usr/local/cuda-10.0
|
||||
|
||||
ADD debian-bootstrap.sh /tmp/debian-bootstrap.sh
|
||||
RUN /tmp/debian-bootstrap.sh && rm /tmp/debian-bootstrap.sh
|
||||
ADD docker/01-build-server.sh /tmp/01-build-server.sh
|
||||
RUN /tmp/01-build-server.sh && rm /tmp/01-build-server.sh
|
||||
|
||||
ADD docker/02-apt-get-install.sh /tmp/02-apt-get-install.sh
|
||||
RUN /tmp/02-apt-get-install.sh && rm /tmp/02-apt-get-install.sh
|
||||
|
||||
ADD docker/03-custom-install.sh /tmp/03-custom-install.sh
|
||||
RUN /tmp/03-custom-install.sh && rm /tmp/03-custom-install.sh
|
||||
|
||||
ADD docker/04-cleanup.sh /tmp/04-cleanup.sh
|
||||
RUN /tmp/04-cleanup.sh && rm /tmp/04-cleanup.sh
|
||||
|
||||
# Include file path
|
||||
ENV CPATH /usr/lib/jvm/java-8-openjdk-amd64/include:/usr/lib/jvm/java-8-openjdk-amd64/include/linux:/usr/lib/llvm-3.7/include
|
||||
|
||||
@ -26,7 +26,7 @@ don't maintain this package yourself it is preferable that the actual
|
||||
maintainer is also the stackage maintainer, but you are allowed to add
|
||||
it under your own name.
|
||||
|
||||
If your package depends on a C library, please add it to the `debian-bootstrap.sh` script.
|
||||
If your package depends on a C library, please add it to `docker/02-apt-get-install.sh` or `docker/03-custom-install.sh`.
|
||||
|
||||
After doing that, commit with a message like "add foo-bar" and send a pull request.
|
||||
|
||||
|
||||
27
docker/01-build-server.sh
Executable file
27
docker/01-build-server.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This file contains setup needed for the build server to function at all.
|
||||
|
||||
set -exuo pipefail
|
||||
|
||||
mkdir -p /home/stackage
|
||||
|
||||
export LANG=C.UTF-8
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get update
|
||||
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
|
||||
stack setup --resolver ghc-$GHCVER
|
||||
153
docker/02-apt-get-install.sh
Executable file
153
docker/02-apt-get-install.sh
Executable file
@ -0,0 +1,153 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -exuo pipefail
|
||||
|
||||
export LANG=C.UTF-8
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# List of ubuntu packages needed to build stackage's haskell packages.
|
||||
#
|
||||
# If new packages are added here, please document why they are needed
|
||||
# e.g. "# for my-package"
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install -y \
|
||||
apt-transport-https \
|
||||
build-essential \
|
||||
cmake \
|
||||
curl \
|
||||
dvipng \
|
||||
freeglut3-dev \
|
||||
freetds-dev \
|
||||
fsharp \
|
||||
g++ \
|
||||
gawk \
|
||||
git \
|
||||
gnupg \
|
||||
gradle \
|
||||
hscolour \
|
||||
libadns1-dev \
|
||||
libaio1 \
|
||||
libalut-dev \
|
||||
libasound2-dev \
|
||||
libblas-dev \
|
||||
libbrotli-dev \
|
||||
libbz2-dev \
|
||||
libcairo2-dev \
|
||||
libclang-12-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libcwiid-dev \
|
||||
libdbusmenu-glib-dev \
|
||||
libdbusmenu-gtk3-dev \
|
||||
libdevil-dev \
|
||||
libedit-dev \
|
||||
libedit2 \
|
||||
libfftw3-dev \
|
||||
libflac-dev \
|
||||
libfreenect-dev \
|
||||
libgd-dev \
|
||||
libgeoip-dev \
|
||||
libgirepository1.0-dev \
|
||||
libglew-dev \
|
||||
libglfw3-dev \
|
||||
libglib2.0-dev \
|
||||
libglu1-mesa-dev \
|
||||
libgmp3-dev \
|
||||
libgnutls28-dev \
|
||||
libgraphene-1.0-dev \
|
||||
libgsasl7-dev \
|
||||
libgsl-dev \
|
||||
libgtk-3-dev \
|
||||
libgtk2.0-dev \
|
||||
libgtksourceview-3.0-dev \
|
||||
libhidapi-dev \
|
||||
libi2c-dev \
|
||||
libicu-dev \
|
||||
libimlib2-dev \
|
||||
libjack-jackd2-dev \
|
||||
libjansson-dev \
|
||||
libjavascriptcoregtk-4.0-dev \
|
||||
libjudy-dev \
|
||||
liblapack-dev \
|
||||
libleveldb-dev \
|
||||
liblmdb-dev \
|
||||
liblz4-tool \
|
||||
liblzma-dev \
|
||||
libmagic-dev \
|
||||
libmagickcore-dev \
|
||||
libmagickwand-dev \
|
||||
libmarkdown2-dev \
|
||||
libmono-2.0-dev \
|
||||
libmp3lame-dev \
|
||||
libmpfr-dev \
|
||||
libmpich-dev \
|
||||
libmysqlclient-dev \
|
||||
libncurses5-dev \
|
||||
libnfc-dev \
|
||||
libnotify-dev \
|
||||
liboath-dev \
|
||||
libopenal-dev \
|
||||
libpango1.0-dev \
|
||||
libpcap0.8-dev \
|
||||
libpcre2-dev \
|
||||
libpq-dev \
|
||||
libprotobuf-dev \
|
||||
libre2-dev \
|
||||
librocksdb-dev \
|
||||
libsdl1.2-dev \
|
||||
libsdl2-dev \
|
||||
libsdl2-gfx-dev \
|
||||
libsdl2-image-dev \
|
||||
libsdl2-mixer-dev \
|
||||
libsdl2-ttf-dev \
|
||||
libsecp256k1-dev \
|
||||
libsnappy-dev \
|
||||
libsndfile1-dev \
|
||||
libsodium-dev \
|
||||
libsox-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libsystemd-dev \
|
||||
libtagc0-dev \
|
||||
libtre-dev \
|
||||
libudev-dev \
|
||||
libusb-1.0-0-dev \
|
||||
libvte-2.91-dev \
|
||||
libxau-dev \
|
||||
libxml2-dev \
|
||||
libxrandr-dev \
|
||||
libxss-dev \
|
||||
libyaml-dev \
|
||||
libzip-dev \
|
||||
libzmq3-dev \
|
||||
libzstd-dev \
|
||||
llvm-7 \
|
||||
llvm-8 \
|
||||
llvm-9 \
|
||||
locales \
|
||||
m4 \
|
||||
minisat \
|
||||
mono-mcs \
|
||||
nettle-dev \
|
||||
ninja-build \
|
||||
openjdk-8-jdk \
|
||||
python-mpltoolkits.basemap \
|
||||
python3-matplotlib \
|
||||
python3-numpy \
|
||||
python3-pip \
|
||||
python3-scipy \
|
||||
r-base \
|
||||
r-base-dev \
|
||||
rpm \
|
||||
ruby-dev \
|
||||
software-properties-common \
|
||||
sudo \
|
||||
texlive \
|
||||
unixodbc-dev \
|
||||
unzip \
|
||||
wget \
|
||||
xclip \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zsh
|
||||
@ -1,181 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Work in progress: create a list of commands necessary to get Stackage
|
||||
# up-and-running on a freshly installed Debian-based system (including Ubuntu).
|
||||
|
||||
# Quick start:
|
||||
# wget -O - https://raw.github.com/commercialhaskell/stackage/master/debian-bootstrap.sh | bash -ex
|
||||
|
||||
# NOTE: Requires that GHC and Cabal are installed and on your PATH. For
|
||||
# instructions, see:
|
||||
# http://www.stackage.org/install
|
||||
|
||||
set -exuo pipefail
|
||||
|
||||
mkdir -p /home/stackage
|
||||
|
||||
export LANG=C.UTF-8
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Get curl and unzip
|
||||
apt-get update
|
||||
apt-get install -y curl unzip
|
||||
# Add system dependencies not present in the ubuntu package registry here.
|
||||
# Please add a comment stating which haskell packages needs it.
|
||||
|
||||
# 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
|
||||
stack setup --resolver ghc-$GHCVER
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install -y \
|
||||
apt-transport-https \
|
||||
build-essential \
|
||||
cmake \
|
||||
curl \
|
||||
dvipng \
|
||||
freeglut3-dev \
|
||||
freetds-dev \
|
||||
fsharp \
|
||||
g++ \
|
||||
gawk \
|
||||
git \
|
||||
gnupg \
|
||||
gradle \
|
||||
hscolour \
|
||||
libadns1-dev \
|
||||
libaio1 \
|
||||
libalut-dev \
|
||||
libasound2-dev \
|
||||
libblas-dev \
|
||||
libbrotli-dev \
|
||||
libbz2-dev \
|
||||
libcairo2-dev \
|
||||
libclang-3.9-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libcwiid-dev \
|
||||
libdbusmenu-glib-dev \
|
||||
libdbusmenu-gtk3-dev \
|
||||
libdevil-dev \
|
||||
libedit-dev \
|
||||
libedit2 \
|
||||
libfftw3-dev \
|
||||
libflac-dev \
|
||||
libfreenect-dev \
|
||||
libgd-dev \
|
||||
libgeoip-dev \
|
||||
libgirepository1.0-dev \
|
||||
libglew-dev \
|
||||
libglfw3-dev \
|
||||
libglib2.0-dev \
|
||||
libglu1-mesa-dev \
|
||||
libgmp3-dev \
|
||||
libgnutls28-dev \
|
||||
libgraphene-1.0-dev \
|
||||
libgsasl7-dev \
|
||||
libgsl-dev \
|
||||
libgtk-3-dev \
|
||||
libgtk2.0-dev \
|
||||
libgtksourceview-3.0-dev \
|
||||
libhidapi-dev \
|
||||
libi2c-dev \
|
||||
libicu-dev \
|
||||
libimlib2-dev \
|
||||
libjack-jackd2-dev \
|
||||
libjansson-dev \
|
||||
libjavascriptcoregtk-4.0-dev \
|
||||
libjudy-dev \
|
||||
liblapack-dev \
|
||||
libleveldb-dev \
|
||||
liblmdb-dev \
|
||||
liblz4-tool \
|
||||
liblzma-dev \
|
||||
libmagic-dev \
|
||||
libmagickcore-dev \
|
||||
libmagickwand-dev \
|
||||
libmarkdown2-dev \
|
||||
libmono-2.0-dev \
|
||||
libmp3lame-dev \
|
||||
libmpfr-dev \
|
||||
libmpich-dev \
|
||||
libmysqlclient-dev \
|
||||
libncurses5-dev \
|
||||
libnfc-dev \
|
||||
libnotify-dev \
|
||||
liboath-dev \
|
||||
libopenal-dev \
|
||||
libpango1.0-dev \
|
||||
libpcap0.8-dev \
|
||||
libpcre2-dev \
|
||||
libpq-dev \
|
||||
libprotobuf-dev \
|
||||
libre2-dev \
|
||||
librocksdb-dev \
|
||||
libsdl1.2-dev \
|
||||
libsdl2-dev \
|
||||
libsdl2-gfx-dev \
|
||||
libsdl2-image-dev \
|
||||
libsdl2-mixer-dev \
|
||||
libsdl2-ttf-dev \
|
||||
libsecp256k1-dev \
|
||||
libsnappy-dev \
|
||||
libsndfile1-dev \
|
||||
libsodium-dev \
|
||||
libsox-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libsystemd-dev \
|
||||
libtagc0-dev \
|
||||
libtre-dev \
|
||||
libudev-dev \
|
||||
libusb-1.0-0-dev \
|
||||
libvte-2.91-dev \
|
||||
libwebkitgtk-3.0-dev \
|
||||
libxau-dev \
|
||||
libxml2-dev \
|
||||
libxrandr-dev \
|
||||
libxss-dev \
|
||||
libyaml-dev \
|
||||
libzip-dev \
|
||||
libzmq3-dev \
|
||||
libzstd-dev \
|
||||
llvm-7 \
|
||||
llvm-8 \
|
||||
llvm-9 \
|
||||
locales \
|
||||
m4 \
|
||||
minisat \
|
||||
mono-mcs \
|
||||
nettle-dev \
|
||||
ninja-build \
|
||||
openjdk-8-jdk \
|
||||
python-mpltoolkits.basemap \
|
||||
python3-matplotlib \
|
||||
python3-numpy \
|
||||
python3-pip \
|
||||
python3-scipy \
|
||||
r-base \
|
||||
r-base-dev \
|
||||
rpm \
|
||||
ruby-dev \
|
||||
software-properties-common \
|
||||
sudo \
|
||||
texlive \
|
||||
unixodbc-dev \
|
||||
wget \
|
||||
xclip \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zsh
|
||||
|
||||
# odbc
|
||||
# TODO: See if we can fix this...
|
||||
@ -331,10 +163,3 @@ pushd /tmp \
|
||||
&& popd \
|
||||
&& popd
|
||||
)
|
||||
|
||||
|
||||
# EOF: don't build anything below this line
|
||||
|
||||
# Cleanup
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
10
docker/04-cleanup.sh
Executable file
10
docker/04-cleanup.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -exuo pipefail
|
||||
|
||||
export LANG=C.UTF-8
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Cleanup
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
Loading…
Reference in New Issue
Block a user