-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
37 lines (28 loc) · 1017 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
26
27
28
29
30
31
32
33
34
35
36
37
FROM python:3.11.3
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
# we do not want pipenv to create a virtualenv inside the container
ENV PIPENV_SITE_PACKAGES 1
WORKDIR /app
RUN pip install --no-cache-dir pipenv==2023.2.4
# Copy over and install Pipfiles and use pip to install requirements
# outside of virtualenv
COPY Pipfile Pipfile.lock /app/
# Copy in the local openapi_client libraries referenced by Pipfile
COPY openapi_client /app/openapi_client
RUN set -x \
&& pipenv install --system --deploy --site-packages --ignore-pipfile \
&& rm -rf /root/.local/share/virtualenv /root/.local/share/virtualenvs
# Copy over everything else for the app:
COPY docker.__init__.py /app/__init__.py
COPY locustfiles /app/locustfiles
COPY static /app/static
COPY tasks /app/tasks
COPY utils /app/utils
COPY fixtures /app/fixtures
EXPOSE 8089 5557
# put the arg at the bottom so it doesn't invalidate docker layer
# caching unnecessarily
ARG GIT_COMMIT
ENV GIT_COMMIT=${GIT_COMMIT}
ENTRYPOINT ["locust"]