-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (23 loc) · 776 Bytes
/
Dockerfile
File metadata and controls
34 lines (23 loc) · 776 Bytes
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
32
33
34
FROM ghcr.io/cal-itp/docker-python-web:main as build_wheel
WORKDIR /build
# upgrade pip
RUN python -m pip install --upgrade pip
COPY . .
RUN git config --global --add safe.directory /build
RUN mkdir -p static
# build as root user so unnecessary files are not copied into tarball
USER root
RUN pip install build && python -m build
FROM ghcr.io/cal-itp/docker-python-web:main as appcontainer
# upgrade pip
RUN python -m pip install --upgrade pip
ENV FLASK_APP=eligibility_server.app:app
COPY --from=build_wheel /build/dist /build/dist
COPY --from=build_wheel /build/static static
# copy source files
COPY bin bin
# install source as a package
RUN pip install $(find /build/dist -name eligibility_server*.whl)
# start app
ENTRYPOINT ["/bin/bash"]
CMD ["bin/start.sh"]