-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (27 loc) · 845 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
FROM alpine:latest
USER root
# install curl
RUN apk update \
&& apk add --update curl rsync \
&& rm -rf /var/cache/apk/* \
&& apk upgrade
# install nodejs, npm
RUN apk add --update npm \
# install git
&& apk add --no-cache bash git openssh
# create a directory to shove the code into
RUN mkdir /express-ts-api-boilerplate
RUN mkdir /logs
RUN mkdir /api
# clone branch
RUN git clone -b main https://github.com/dhlevi/express-ts-api-boilerplate.git /express-ts-api-boilerplate
WORKDIR /express-ts-api-boilerplate
RUN rm -rf package-lock.json
RUN npm install -g typescript
RUN npm install
RUN npm run build
WORKDIR /
CMD [ "node", "express-ts-api-boilerplate/build/index.js"]
# CMD tail -f /dev/null
# docker build . -t express_boilerplate
# docker run --name express_boilerplate_api -p 8080:1337 express_boilerplate:latest