Skip to content

Commit feb81c3

Browse files
committed
Dockerfile
1 parent 92afc9c commit feb81c3

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

lambdas/delta_backend/Dockerfile

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,31 @@ RUN mkdir -p /home/appuser && \
66
echo 'appuser:x:1001:' >> /etc/group && \
77
chown -R 1001:1001 /home/appuser && pip install "poetry~=2.1.4"
88

9+
# Install Poetry dependencies
10+
# Copy ack_backend Poetry files
11+
COPY ./delta_backend/poetry.lock ./delta_backend/pyproject.toml ./delta_backend/README.md ./
912

10-
11-
COPY poetry.lock pyproject.toml README.md ./
13+
# Install ack_backend dependencies
14+
WORKDIR /var/task
1215
RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi --no-root --only main
1316

14-
1517
# -----------------------------
1618
FROM base AS build
1719

18-
COPY src .
20+
# Set working directory back to Lambda task root
21+
WORKDIR /var/task
22+
23+
# Copy shared source code
24+
COPY ./shared/src/common ./common
25+
26+
# Copy delta_backend source code
27+
COPY ./delta_backend/src .
28+
29+
# Set correct permissions
1930
RUN chmod 644 $(find . -type f) && chmod 755 $(find . -type d)
31+
2032
# Switch to the non-root user for running the container
2133
USER 1001:1001
34+
35+
# Set the Lambda handler
2236
CMD ["delta.handler"]

0 commit comments

Comments
 (0)