2022-12-23 12:48:45 -06:00
# syntax=docker/dockerfile:1
2023-11-01 17:59:23 -04:00
FROM node:20
2023-10-03 15:36:27 -04:00
2024-09-13 16:48:05 -04:00
# Update image
RUN apt-get update && \
apt-get upgrade -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
2023-10-03 15:36:27 -04:00
2024-09-13 16:48:05 -04:00
# Copy source code
COPY ./javascriptv3 /javascriptv3
2024-01-09 12:20:19 -05:00
2024-09-13 16:48:05 -04:00
# Set non-root user
RUN useradd -m automation && \
chown -R automation:automation /javascriptv3
USER automation:automation
2023-10-03 15:36:27 -04:00
2024-09-13 16:48:05 -04:00
# 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
2025-01-22 08:20:07 -06:00
COPY --chown= automation:automation ./scenarios/features /scenarios/features
2023-11-01 17:59:23 -04:00
2025-03-25 17:43:47 -07:00
WORKDIR /javascriptv3
2024-09-13 16:48:05 -04:00
# 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
2024-12-19 10:12:18 -05:00
# `aws-cdk` is required by some integration tests in order to deploy resources
2024-12-24 09:49:12 -07:00
CMD npm i aws-cdk && npm i --prefix /javascriptv3 && npm run --prefix /javascriptv3 integration-test