-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.build
46 lines (35 loc) · 1004 Bytes
/
Dockerfile.build
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
# Dockerfile that builds the service from source
# E.g. for publication on Dockerhub
FROM haskell:9.6.4 as build
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get -y install \
libpq-dev
COPY service /service
COPY auth-service-core /auth-service-core
WORKDIR /service
RUN mkdir /dist && \
stack --stack-yaml stack.dockerhub.yaml build --install-ghc --copy-bins --local-bin-path /dist -j2
FROM ubuntu:jammy
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get -y install \
build-essential \
curl \
libgmp10 \
libicu-dev \
libpq-dev \
libxml2-dev \
locales \
msmtp-mta \
pkg-config \
ssh-client && \
locale-gen en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8
ENV PATH=/app:$PATH
EXPOSE 80
COPY --from=build /dist/auth-service /app/auth-service
CMD ["auth-service", "run"]
HEALTHCHECK CMD curl --fail "http://localhost/status"