-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.build
More file actions
30 lines (23 loc) · 845 Bytes
/
Dockerfile.build
File metadata and controls
30 lines (23 loc) · 845 Bytes
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
# This Dockerfile is used to build the token-rotator app in a linux environment and the entrypoint copies the built
# files back to ./dist so you can run it locally and test it with the Dockerfile (lambda execution platform).
#
# The Dockerfile expects the root of the repo to be mounted to /localhost
#
# Example:
#
# docker build -t token-rotator-build -f apps/token-rotator/Dockerfile.build . && \
# docker run -it -v "$(pwd):/localhost" token-rotator-build
FROM amazonlinux:2023
RUN mkdir -p /src
RUN mkdir /localhost
RUN yum install -y gcc-c++ make
RUN curl --silent --location https://rpm.nodesource.com/setup_16.x | bash - && \
yum -y install nodejs
# add app
COPY . /src
# install app dependencies
WORKDIR /src
RUN npm install
RUN npm run build
ENV NODE_ENV=production
ENTRYPOINT [ "/src/apps/token-rotator/copy-local.sh" ]