mirror of
https://github.com/alexgo-io/redstone-cache-layer.git
synced 2026-01-12 22:43:30 +08:00
23 lines
631 B
Docker
23 lines
631 B
Docker
# This Dockerfile contains a docker container configuration
|
|
# for redstone cache layer express app connected to the Mongo DB
|
|
# Mongo DB connection url must be specified in .secrets.json file
|
|
|
|
FROM public.ecr.aws/lambda/nodejs:16 as builder
|
|
WORKDIR /usr/app
|
|
COPY package.json package.json
|
|
COPY yarn.lock yarn.lock
|
|
RUN npm i -g yarn
|
|
RUN yum update -y
|
|
RUN yum groupinstall "Development Tools" -y
|
|
RUN yum install -y git python3 g++ make
|
|
RUN yarn install
|
|
COPY . .
|
|
RUN yarn build
|
|
|
|
FROM public.ecr.aws/lambda/nodejs:16
|
|
WORKDIR ${LAMBDA_TASK_ROOT}
|
|
ENV MODE=PROD
|
|
COPY --from=builder /usr/app/ ./
|
|
RUN cp -r ./dist/* ./
|
|
CMD ["index.handler"]
|