-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (22 loc) · 894 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
ARG BASE_IMAGE=ubuntu:22.04
FROM $BASE_IMAGE
SHELL ["/bin/bash", "-c"]
# needed to suppress tons of debconf messages
ENV DEBIAN_FRONTEND noninteractive
RUN apt update --fix-missing && apt upgrade --yes \
&& apt install -y software-properties-common apt-utils build-essential git wget curl \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt update \
&& apt install -y --no-install-recommends python3.11-dev python3.11-distutils python3-pip python3-apt \
&& apt purge --auto-remove \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*
# Set python3.11 as default
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
RUN python3 -m pip install --upgrade pip
COPY weatherapi ./weatherapi
COPY scripts/* pyproject.toml README.md ./
RUN pip install -e ".[dev]"
EXPOSE ${PORT}
ENTRYPOINT []
CMD [ "/usr/bin/bash", "-c", "./run_server.sh" ]