draft: ci: Build container image

This image will be used to deploy the application on the Kubernetes
cluster.
This commit is contained in:
2022-08-01 18:29:08 -05:00
parent 7b00ab1f2c
commit 536c859bca
8 changed files with 102 additions and 0 deletions

19
container/Containerfile Normal file
View File

@@ -0,0 +1,19 @@
FROM docker.io/python:3.10-slim AS build
COPY wheels /tmp/wheels
COPY requirements.txt /tmp
RUN python -m venv /usr/local/hudctrl
RUN /usr/local/hudctrl/bin/python -m \
pip install -f /tmp/wheels -r /tmp/requirements.txt
COPY ui /usr/local/hudctrl/ui
FROM docker.io/python:3.10-slim
RUN apt-get update && \
apt-get install -y nginx tini && \
rm -rf /var/cache/apt /var/lib/apt
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build /usr/local/hudctrl /usr/local/hudctrl
COPY run.sh /
CMD ["tini", "--", "/run.sh"]