-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (41 loc) · 1.17 KB
/
Dockerfile
File metadata and controls
47 lines (41 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM ubuntu:20.04 AS builder
# set up build environment
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
curl \
git \
build-essential \
libgmp-dev \
zlib1g-dev \
libncurses5-dev \
libncursesw5-dev \
libtinfo-dev \
libicu-dev \
pkg-config \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sSL https://github.com/commercialhaskell/stack/releases/download/v2.7.5/stack-2.7.5-linux-x86_64-static.tar.gz | tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack'
WORKDIR /app
COPY stack.yaml stack.yaml.lock* package.yaml *.cabal ./
RUN stack setup
# build
RUN stack build --only-dependencies
COPY . .
RUN stack build
RUN stack install
FROM ubuntu:20.04
# set up runtime dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
libgmp10 \
zlib1g \
libncurses5 \
libncursesw5 \
libtinfo5 \
libicu66 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /root/.local/bin/ted /usr/local/bin/ted
COPY --from=builder /app/demo.txt /app/demo.txt
WORKDIR /app
# No default command - container meant to be used interactively