gonito/Dockerfile

49 lines
1.0 KiB
Docker
Raw Normal View History

2020-03-11 23:34:37 +01:00
FROM fpco/stack-build:lts-12.26 AS gonito-build
MAINTAINER Filip Gralinski <filipg@ceti.pl>
WORKDIR /root/
2020-03-26 21:16:20 +01:00
RUN apt-get -y update && apt-get -y install libfcgi-dev && apt-get clean && rm -rf /var/lib/apt/lists/*
2020-03-11 23:34:37 +01:00
2021-05-12 07:03:17 +02:00
COPY stack.yaml gonito.cabal /root/pre-build/
2021-04-17 11:37:41 +02:00
2021-05-12 07:03:17 +02:00
COPY geval /root/pre-build/geval
2020-03-11 23:34:37 +01:00
2021-05-12 07:03:17 +02:00
WORKDIR /root/pre-build
2020-03-11 23:34:37 +01:00
2021-05-12 07:03:17 +02:00
RUN ls /root
RUN stack upgrade
RUN stack --version
RUN stack build --system-ghc --only-dependencies
COPY . /root/gonito/
WORKDIR /root/gonito
RUN stack install --system-ghc && rm -rf /root/.stack
2020-03-11 23:34:37 +01:00
FROM ubuntu:16.04 AS gonito-run
2021-04-26 07:51:07 +02:00
RUN apt-get -y update && apt-get -y install git git-annex libcairo2 libpq5 locales && apt-get clean && rm -rf /var/lib/apt/lists/*
2021-04-17 11:37:41 +02:00
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG=en_US.UTF-8 \ LANGUAGE=en_US \ LC_ALL=en_US.UTF-8
2020-03-11 23:34:37 +01:00
RUN mkdir /gonito
WORKDIR /gonito
COPY --from=gonito-build /root/.local/bin/gonito-bin ./
COPY --from=gonito-build /root/gonito/static static
COPY --from=gonito-build /root/gonito/config config
CMD ./gonito-bin