aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorbozo.kopic <bozo@kopic.xyz>2022-09-26 23:11:28 +0200
committerbozo.kopic <bozo@kopic.xyz>2022-09-26 23:11:28 +0200
commit99c4a3dcd0def97e979ca100a1f91a425fd02dd9 (patch)
tree288128203a5485e93579b89ff05726dce71d7275 /Dockerfile
parent8f60e0a1ba5d2402c14f6c6c99177500d5c83f63 (diff)
new version cleanup
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"]