generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
21 lines (15 loc) · 1.09 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#checkov:skip=CKV_DOCKER_2: HEALTHCHECK not required - AWS Lambda does not support HEALTHCHECK
#checkov:skip=CKV_DOCKER_3: USER not required - A non-root user is used by AWS Lambda
FROM public.ecr.aws/lambda/python:3.12@sha256:a05b85bc8919d6c7db4f438a616bbb1ea8af5804e3f0a9d59acc38b624e9b711
LABEL org.opencontainers.image.vendor="Ministry of Justice" \
org.opencontainers.image.authors="Observability Platform (observability-platform@digital.justice.gov.uk)" \
org.opencontainers.image.title="Grafana API Key Rotator" \
org.opencontainers.image.description="Creates or updates an API key for Amazon Managed Grafana and uploads it to AWS Secrets Manager" \
org.opencontainers.image.url="https://github.com/ministryofjustice/observability-platform-grafana-api-key-rotator"
SHELL ["/bin/bash", "-e", "-u", "-o", "pipefail", "-c"]
COPY --chown=nobody:nobody --chmod=0755 src/var/task/ ${LAMBDA_TASK_ROOT}
RUN <<EOF
python -m pip install --no-cache-dir --requirement requirements-pip.txt
python -m pip install --no-cache-dir --requirement requirements.txt
EOF
CMD ["function.lambda_handler"]