aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorbozo.kopic <bozo.kopic@gmail.com>2020-04-11 20:21:24 +0200
committerbozo.kopic <bozo.kopic@gmail.com>2020-04-11 20:21:24 +0200
commit56a75fcb8f5a9e4c05ccec8eb4a3345a115da441 (patch)
treefb47ceaa9da22713898e28e61f95d5ca670ee95a /Dockerfile
parentd950fe9c67ec052ce13f54c50c25387b61c3ce32 (diff)
docker build
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile25
1 files changed, 25 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..0e093c5
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,25 @@
+FROM python:3.8-buster AS base
+
+
+FROM base AS build
+
+RUN apt-get update \
+ && apt-get install -q -y nodejs yarnpkg \
+ && ln -s /usr/bin/yarnpkg /usr/bin/yarn
+
+COPY . /opcut
+
+RUN cd /opcut \
+ && pip install -r requirements.txt \
+ && doit
+
+
+FROM base AS run
+
+COPY --from=build /opcut/dist /opcut/dist
+
+RUN pip install /opcut/dist/*
+
+EXPOSE 80
+
+CMD ["opcut", "server", "--addr", "http://0.0.0.0:80"]