Skip to content

Commit c7b8caf

Browse files
added 0.1 code
1 parent 483e2a5 commit c7b8caf

File tree

4 files changed

+196
-207
lines changed

4 files changed

+196
-207
lines changed

.gitignore

Lines changed: 0 additions & 207 deletions
This file was deleted.

Containerfile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# BUILDER
2+
FROM python:3.14.0-slim-bookworm as builder
3+
LABEL org.opencontainers.image.source="https://github.com/oats-center/avena-speedtest"
4+
WORKDIR /usr/src/app
5+
6+
# Install Iperf3
7+
RUN apt-get -y update
8+
RUN apt-get -y install iperf3
9+
10+
# Activate virtualenv
11+
RUN python -m venv /opt/venv
12+
13+
# Make sure we use the virtualenv
14+
ENV PATH="/opt/venv/bin:$PATH"
15+
16+
# Copy requirements and build with pip
17+
COPY requirements.txt ./
18+
RUN pip install -r requirements.txt
19+
20+
21+
22+
# RUNTIME
23+
FROM python:3.14.0-slim-bookworm as runtime
24+
25+
WORKDIR /usr/src/app
26+
27+
# Copy compiled venv from builder
28+
COPY --from=builder /opt/venv /opt/venv
29+
30+
# Make sure we use the virtualenv
31+
ENV PATH="/opt/venv/bin:$PATH"
32+
33+
# Copy health check script
34+
#COPY healthcheck.py .
35+
#HEALTHCHECK CMD ["python", "./healthcheck.py"]
36+
37+
# Copy script over and run
38+
COPY speedtest.py .
39+
CMD [ "python", "./speedtest.py" ]

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nats-py==2.12.0
2+
python-dateutil==2.9.0.post0
3+
iperf3==0.1.11

0 commit comments

Comments
 (0)