aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-05-14 07:07:03 +0000
committerFuwn <[email protected]>2024-05-14 07:07:03 +0000
commitc343c9891771142c32d47724437db7b5db00d46b (patch)
tree06b3eaa7d284c1a57615ecaa435daafded0efbeb /Dockerfile
parentci(github): gleam check workflow (diff)
downloadmayu-0.1.0.tar.xz
mayu-0.1.0.zip
feat(Docker): Docker supportv0.1.0
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..7c51b6f
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,25 @@
+FROM ghcr.io/gleam-lang/gleam:v1.1.0-erlang-alpine as builder
+
+WORKDIR /mayu/
+
+COPY src/ /mayu/src/
+COPY themes/ /mayu/themes/
+COPY gleam.toml /mayu/
+COPY manifest.toml /mayu/
+
+RUN apk add --no-cache build-base
+
+RUN gleam build \
+ && cd build/ \
+ && gleam export erlang-shipment
+
+FROM ghcr.io/gleam-lang/gleam:v1.1.0-erlang-alpine
+
+COPY --from=builder /mayu/build/erlang-shipment/ /mayu/erlang-shipment/
+COPY --from=builder /mayu/themes /mayu/themes/
+
+WORKDIR /mayu/
+
+ENTRYPOINT ["./erlang-shipment/entrypoint.sh"]
+
+CMD ["run"]