Add docker build
This commit is contained in:
parent
63f290107c
commit
99941bc2a1
45
Dockerfile
Normal file
45
Dockerfile
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
FROM alpine:edge
|
||||||
|
|
||||||
|
# ghc and cabal
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
curl \
|
||||||
|
gcc \
|
||||||
|
g++ \
|
||||||
|
gmp-dev \
|
||||||
|
ncurses-dev \
|
||||||
|
libffi-dev \
|
||||||
|
make \
|
||||||
|
xz \
|
||||||
|
tar \
|
||||||
|
perl \
|
||||||
|
\
|
||||||
|
cabal \
|
||||||
|
ghc
|
||||||
|
|
||||||
|
# utils
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
bash
|
||||||
|
|
||||||
|
## Package specific
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
libbz2 \
|
||||||
|
bzip2-dev \
|
||||||
|
bzip2-static \
|
||||||
|
zlib \
|
||||||
|
zlib-dev \
|
||||||
|
zlib-static \
|
||||||
|
gmp \
|
||||||
|
gmp-dev \
|
||||||
|
openssl-dev \
|
||||||
|
openssl-libs-static \
|
||||||
|
xz \
|
||||||
|
xz-dev
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN chmod +x /app/docker/build.sh
|
||||||
|
|
14
docker/build.sh
Normal file
14
docker/build.sh
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
cd /app
|
||||||
|
|
||||||
|
cabal v2-update
|
||||||
|
|
||||||
|
cabal v2-install \
|
||||||
|
--install-method=copy \
|
||||||
|
--overwrite-policy=always \
|
||||||
|
--installdir="/bin" \
|
||||||
|
--ghc-options='-optl-static'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user