-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (25 loc) · 937 Bytes
/
Dockerfile
File metadata and controls
37 lines (25 loc) · 937 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
31
32
33
34
35
36
ARG BUILDER_IMAGE
ARG AWS_CLI_VERSION
FROM ${BUILDER_IMAGE} AS builder
WORKDIR /usr/src/app
RUN python3 -m venv /venv
ENV PATH="/venv/bin:$PATH"
RUN pip install --no-cache-dir --upgrade pip
#RUN apk add cargo
COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
FROM ${BUILDER_IMAGE} AS service
# Install the aws cli v2, which is now default in alpine
ARG AWS_CLI_VERSION
RUN apk update && apk add aws-cli==${AWS_CLI_VERSION} bash zip curl
#ENV PATH=/usr/bin:/venv/bin:/root/app/site-packages/bin:$PATH
ENV PATH=/usr/bin:/venv/bin:$PATH
WORKDIR /app/site-packages
COPY --from=builder /venv /venv
# Add awslocal to site-packages/bin, with priority to awsv2 bin
# As awscli is added for the bindings, v1 will be also added
COPY bin/awslocal-docker /venv/bin/awslocal
USER root
VOLUME /app/data
#SHELL ["/bin/bash"]
ENTRYPOINT ["/venv/bin/python3", "/root/app/site-packages/bin/awslocal"]