-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (40 loc) · 1.02 KB
/
Dockerfile
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
# ---------- Base ----------
FROM frolvlad/alpine-glibc:alpine-3.11_glibc-2.30 AS base
WORKDIR /app
RUN apk update
RUN apk add --no-cache \
bash \
libstdc++ \
build-base \
libtool \
autoconf \
automake \
libexecinfo-dev \
make \
cmake \
libcurl \
python3 \
py3-pip \
npm \
yarn \
gmp
RUN yarn global add npx --prefix /usr/local
RUN yarn global add aws-lambda-ric --prefix /usr/local
# ---------- Builder ----------
FROM base AS builder
COPY package*.json .babelrc ./
RUN yarn install
COPY ./src ./src
COPY ./dependencies ./dependencies
RUN yarn setup
RUN yarn build
RUN yarn install --production
# ---------- Release ----------
FROM base as release
COPY ./src ./src
COPY --from=builder /app/dependencies ./dependencies
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./src
ENV PATH "$PATH:/app/dependencies/belenios/_build/install/default/bin"
ENTRYPOINT ["/usr/local/bin/npx", "aws-lambda-ric"]
CMD ["./src/functions/graphql/index.graphqlHandler"]