-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (19 loc) · 704 Bytes
/
Copy pathDockerfile
File metadata and controls
28 lines (19 loc) · 704 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
# see https://docs.docker.com/build/building/multi-stage/
# https://hub.docker.com/_/gcc
FROM gcc:13.2.0 AS builder
RUN apt-get update && apt-get -y install cmake protobuf-compiler
WORKDIR /project
COPY src /project/src
COPY CMakeLists.txt /project/CMakeLists.txt
COPY src/docker/build.sh /project/build.sh
RUN /bin/bash /project/build.sh
FROM python:3.8-slim-buster
RUN useradd -ms /bin/bash local_user
USER local_user
WORKDIR /app
COPY src/docker/requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY src/web /app/web
COPY --from=builder /project/build/product/tools/title_case /app/title_case
WORKDIR /app/web/
CMD [ "python3", "web.py", "/app/web/resources/", "/app/"]