Skip to content

Commit 73e5b94

Browse files
committed
Do a first run inside Dockerfile to create .pyc files
1 parent 4c24bac commit 73e5b94

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Diff for: Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ ENV PYTHONUNBUFFERED=1
4444
RUN useradd --create-home locust
4545
# ensure correct permissions
4646
RUN chown -R locust /opt/venv
47+
# perform initial bytecode compilation (brings down total startup time from ~0.9s to ~0.6s)
48+
RUN locust --version
4749
USER locust
4850
WORKDIR /home/locust
4951
EXPOSE 8089 5557

Diff for: Dockerfile.ci

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ ENV PYTHONUNBUFFERED=1
2323
RUN useradd --create-home locust
2424
# ensure correct permissions
2525
RUN chown -R locust /opt/venv
26+
# perform initial bytecode compilation (brings down total startup time from ~0.9s to ~0.6s)
27+
RUN locust --version
2628
USER locust
2729
WORKDIR /home/locust
2830
EXPOSE 8089 5557

0 commit comments

Comments
 (0)