aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile22
1 files changed, 22 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..e01a1b2
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,22 @@
+FROM python:3.10-slim-bullseye as opcut-base
+WORKDIR /opcut
+RUN apt update -qy && \
+ apt install -qy pkg-config gcc libcairo2-dev
+
+FROM opcut-base as opcut-build
+WORKDIR /opcut
+RUN apt install -qy nodejs yarnpkg git gcc-mingw-w64-x86-64-win32 && \
+ ln -sT /usr/bin/yarnpkg /usr/bin/yarn && \
+ ln -sT /usr/bin/x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-cc
+COPY . .
+RUN pip install -qq -r requirements.pip.dev.txt && \
+ doit clean_all && \
+ doit
+
+FROM opcut-base as opcut-run
+WORKDIR /opcut
+COPY --from=opcut-build /opcut/build/py/dist/*.whl .
+RUN pip install -qq *.whl && \
+ rm *.whl
+EXPOSE 8080
+CMD ["/usr/local/bin/opcut", "server"]