Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Add docker support #589

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions docker/alpine/3.14.2/8.10.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM alpine:3.14.2

# install deps needed by GHC
RUN apk add --no-cache \
curl \
gcc \
g++ \
binutils \
binutils-gold \
gmp \
ncurses \
libffi \
make \
xz \
tar \
perl

ARG GHCUP_VERSION

# install ghcup
RUN if [ -n "$GHCUP_VERSION" ] ; \
then curl -sSfL https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/x86_64-linux-ghcup-$GHCUP_VERSION > /usr/bin/ghcup ; \
else curl -sSfL https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > /usr/bin/ghcup ; \
fi && \
chmod +x /usr/bin/ghcup

ENV GHCUP_INSTALL_BASE_PREFIX=/usr/local
ENV PATH=/usr/local/.ghcup/bin:$PATH

RUN ghcup install ghc --set 8.10.7 && \
ghcup install cabal latest && \
ghcup install stack latest
30 changes: 30 additions & 0 deletions docker/alpine/3.14.2/minimal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM alpine:3.14.2

# install deps needed by GHC
RUN apk add --no-cache \
curl \
gcc \
g++ \
binutils \
binutils-gold \
gmp \
ncurses \
libffi \
make \
xz \
tar \
perl

ARG GHCUP_VERSION

# install ghcup
RUN if [ -n "$GHCUP_VERSION" ] ; \
then curl -sSfL https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/x86_64-linux-ghcup-$GHCUP_VERSION > /usr/bin/ghcup ; \
else curl -sSfL https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > /usr/bin/ghcup ; \
fi && \
chmod +x /usr/bin/ghcup

ENV GHCUP_INSTALL_BASE_PREFIX=/usr/local
ENV PATH=/usr/local/.ghcup/bin:$PATH

RUN ghcup prefetch metadata
32 changes: 32 additions & 0 deletions docker/alpine/latest/8.10.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM alpine:latest

# install deps needed by GHC
RUN apk add --no-cache \
curl \
gcc \
g++ \
binutils \
binutils-gold \
gmp \
ncurses \
libffi \
make \
xz \
tar \
perl

ARG GHCUP_VERSION

# install ghcup
RUN if [ -n "$GHCUP_VERSION" ] ; \
then curl -sSfL https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/x86_64-linux-ghcup-$GHCUP_VERSION > /usr/bin/ghcup ; \
else curl -sSfL https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > /usr/bin/ghcup ; \
fi && \
chmod +x /usr/bin/ghcup

ENV GHCUP_INSTALL_BASE_PREFIX=/usr/local
ENV PATH=/usr/local/.ghcup/bin:$PATH

RUN ghcup install ghc --set 8.10.7 && \
ghcup install cabal latest && \
ghcup install stack latest
30 changes: 30 additions & 0 deletions docker/alpine/latest/minimal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM alpine:latest

# install deps needed by GHC
RUN apk add --no-cache \
curl \
gcc \
g++ \
binutils \
binutils-gold \
gmp \
ncurses \
libffi \
make \
xz \
tar \
perl

ARG GHCUP_VERSION

# install ghcup
RUN if [ -n "$GHCUP_VERSION" ] ; \
then curl -sSfL https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/x86_64-linux-ghcup-$GHCUP_VERSION > /usr/bin/ghcup ; \
else curl -sSfL https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > /usr/bin/ghcup ; \
fi && \
chmod +x /usr/bin/ghcup

ENV GHCUP_INSTALL_BASE_PREFIX=/usr/local
ENV PATH=/usr/local/.ghcup/bin:$PATH

RUN ghcup prefetch metadata
25 changes: 25 additions & 0 deletions docker/ubuntu/20.04/8.10.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM ubuntu:20.04

# install deps needed by GHC
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update -y && \
apt-get install -y --no-install-recommends libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl && \
apt-get clean && \
rm -rf /var/cache/apt/archives && \
rm -rf /var/lib/apt/lists/*

ARG GHCUP_VERSION

# install ghcup
RUN if [ -n "$GHCUP_VERSION" ] ; \
then curl -sSfL https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/x86_64-linux-ghcup-$GHCUP_VERSION > /usr/bin/ghcup ; \
else curl -sSfL https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > /usr/bin/ghcup ; \
fi && \
chmod +x /usr/bin/ghcup

ENV GHCUP_INSTALL_BASE_PREFIX=/usr/local
ENV PATH=/usr/local/.ghcup/bin:$PATH

RUN ghcup install ghc --set 8.10.7 && \
ghcup install cabal latest && \
ghcup install stack latest
23 changes: 23 additions & 0 deletions docker/ubuntu/20.04/minimal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM ubuntu:20.04

# install deps needed by GHC
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update -y && \
apt-get install -y --no-install-recommends libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl && \
apt-get clean && \
rm -rf /var/cache/apt/archives && \
rm -rf /var/lib/apt/lists/*

ARG GHCUP_VERSION

# install ghcup
RUN if [ -n "$GHCUP_VERSION" ] ; \
then curl -sSfL https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/x86_64-linux-ghcup-$GHCUP_VERSION > /usr/bin/ghcup ; \
else curl -sSfL https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > /usr/bin/ghcup ; \
fi && \
chmod +x /usr/bin/ghcup

ENV GHCUP_INSTALL_BASE_PREFIX=/usr/local
ENV PATH=/usr/local/.ghcup/bin:$PATH

RUN ghcup prefetch metadata
25 changes: 25 additions & 0 deletions docker/ubuntu/latest/8.10.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM ubuntu:latest

# install deps needed by GHC
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update -y && \
apt-get install -y --no-install-recommends libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl && \
apt-get clean && \
rm -rf /var/cache/apt/archives && \
rm -rf /var/lib/apt/lists/*

ARG GHCUP_VERSION

# install ghcup
RUN if [ -n "$GHCUP_VERSION" ] ; \
then curl -sSfL https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/x86_64-linux-ghcup-$GHCUP_VERSION > /usr/bin/ghcup ; \
else curl -sSfL https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > /usr/bin/ghcup ; \
fi && \
chmod +x /usr/bin/ghcup

ENV GHCUP_INSTALL_BASE_PREFIX=/usr/local
ENV PATH=/usr/local/.ghcup/bin:$PATH

RUN ghcup install ghc --set 8.10.7 && \
ghcup install cabal latest && \
ghcup install stack latest
23 changes: 23 additions & 0 deletions docker/ubuntu/latest/minimal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM ubuntu:latest

# install deps needed by GHC
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update -y && \
apt-get install -y --no-install-recommends libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl && \
apt-get clean && \
rm -rf /var/cache/apt/archives && \
rm -rf /var/lib/apt/lists/*

ARG GHCUP_VERSION

# install ghcup
RUN if [ -n "$GHCUP_VERSION" ] ; \
then curl -sSfL https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/x86_64-linux-ghcup-$GHCUP_VERSION > /usr/bin/ghcup ; \
else curl -sSfL https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > /usr/bin/ghcup ; \
fi && \
chmod +x /usr/bin/ghcup

ENV GHCUP_INSTALL_BASE_PREFIX=/usr/local
ENV PATH=/usr/local/.ghcup/bin:$PATH

RUN ghcup prefetch metadata