forked from awsdocs/aws-doc-sdk-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
25 lines (20 loc) · 879 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
# syntax=docker/dockerfile:1
FROM node:20
# Update image
RUN apt-get update && \
apt-get upgrade -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Copy source code
COPY ./javascriptv3 /javascriptv3
# Set non-root user
RUN useradd -m automation && \
chown -R automation:automation /javascriptv3
USER automation:automation
# Copy resources
COPY --chown=automation:automation ./resources /resources
COPY --chown=automation:automation ./python/example_code/glue/flight_etl_job_script.py /python/example_code/glue/flight_etl_job_script.py
COPY --chown=automation:automation ./workflows /workflows
# Set default command
# `npm i` needs to be run in the container. Otherwise it causes a dependency issue: https://github.com/evanw/esbuild/issues/1646#issuecomment-1238080595
CMD npm i --prefix /javascriptv3 && npm run --prefix /javascriptv3 integration-test