forked from hackforla/food-oasis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-jared
34 lines (25 loc) · 887 Bytes
/
Dockerfile-jared
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
FROM jred/nodejs:12.17 as builder
LABEL maintainer="jared.a.fowler@gmail.com"
LABEL description="Nodejs docker base image"
FROM node:12.17-buster-slim
LABEL maintainer.fola="darragh@entrotech.net"
LABEL org.hackforla="Hack For LA"
LABEL description="Food Oasis app"
ENV NODE_ENV "development"
COPY --from=builder /usr/local/bin/ /usr/local/bin/
WORKDIR /fola
COPY package.json ./
COPY package-lock.json ./
RUN npm ci
# TODO @jafow re-structure directory heirarchy so we can flatten these down
COPY ./server/middleware/ ./middleware
COPY ./server/app/ ./app
COPY ./server/server.js ./
COPY ./server/db/config.js ./db/
COPY ./server/entrypoint.sh ./
# we dont want to run as sudo so create group and user
RUN groupadd -r fola && useradd --no-log-init -r -g fola fola
USER fola
EXPOSE 5000
ENTRYPOINT ["./entrypoint.sh"]
CMD ["node", "server.js"]