From b730f7640c7eaa86a37081ed07c2e1c75f9a30d6 Mon Sep 17 00:00:00 2001 From: djmil Date: Thu, 18 Jul 2024 22:27:17 +0200 Subject: [PATCH] initial implementation --- docker/Dockerfile | 12 ++++++++++++ docker/make-builder.sh | 4 ++++ docker/serve.sh | 10 ++++++++++ 3 files changed, 26 insertions(+) create mode 100644 docker/Dockerfile create mode 100755 docker/make-builder.sh create mode 100755 docker/serve.sh diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..b5bc6d7 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,12 @@ +FROM rust:1.79 + +RUN rustup target add wasm32-unknown-unknown + +RUN cargo install --locked trunk + +ENTRYPOINT ["trunk"] + +CMD ["serve"] + +WORKDIR /egui-circles + diff --git a/docker/make-builder.sh b/docker/make-builder.sh new file mode 100755 index 0000000..cdb8f9f --- /dev/null +++ b/docker/make-builder.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -euxo pipefail + +docker build --tag egui-circles-builder:0.0.1 . \ No newline at end of file diff --git a/docker/serve.sh b/docker/serve.sh new file mode 100755 index 0000000..c3e8530 --- /dev/null +++ b/docker/serve.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +set -euo pipefail + +PROJECT_NAME=egui-circles + +docker run \ + --volume $(pwd)/..:/$PROJECT_NAME \ + --name vsc-$PROJECT_NAME \ + -p 8080:8080 \ + $PROJECT_NAME-builder:0.0.1