-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (31 loc) · 986 Bytes
/
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
43
44
FROM node:carbon
# Create app directory
WORKDIR /app
#Add jdk dependancy
# ENV DEBIAN_FRONTEND=noninteractive
# ENV SERVERLESS serverless@{{ version }}
#Pull docker image of lambda offline
RUN docker pull lambci/lambda
#Install default jre for serverless-offline
RUN apt-get update \
&& apt-get install -y default-jre
#Install serverless dependancy
RUN npm install serverless -g
# Install app dependencies
COPY package*.json ./
#Install packages from package.json
RUN npm install
# Bundle app source
COPY . .
#Install dynamodb locally
# RUN sls dynamodb install --stage dev
#Proxy setup only for ubuntu
# ENV http_proxy 0.0.0.0:8000
# ENV https_proxy 0.0.0.0:8000
#Ready 8000 port for run
# EXPOSE 8000
EXPOSE 3000
# Command for run dynamodb offline
# CMD [ "sls", "dynamodb", "start", "-p", "8000", "--migrate", "true", "--stage", "dev" ]
CMD [ "sls", "offline", "start", "-r", "us-east-1", "--noTimeout", "--stage", "dev"]
# sls offline start -r us-east-1 --noTimeout