draft: ci: Build container image
This image will be used to deploy the application on the Kubernetes cluster.
This commit is contained in:
19
container/Containerfile
Normal file
19
container/Containerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user