blob: 75eecaeeaab86e4ad1b96ef8fc4ea4ac70fbf21b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
FROM fossa/haskell-static-alpine:ghc-8.10.4 AS build
ARG SLAM_GIT_REPO=https://github.com/jantuomi/slam-interpreter.git
ARG SLAM_GIT_CHECKOUT=main
RUN cabal update
RUN git clone $SLAM_GIT_REPO /slam
WORKDIR /slam
RUN git checkout $SLAM_GIT_CHECKOUT
RUN ls src && cabal build --enable-executable-static
RUN mv $(cabal list-bin slam-interpreter) ./interpreter
FROM node:16-alpine AS serve
ENV NODE_ENV production
ENV PORT 8080
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --only-prod
COPY --from=build /slam/interpreter ./
COPY src ./src
CMD ["npm", "start"]
|