From c3ea302ced766ba48ce5693d2f3e0f01a6ed1db9 Mon Sep 17 00:00:00 2001 From: akloeckner Date: Mon, 10 May 2021 09:14:23 +0000 Subject: [PATCH] Add nightly Dockerfile --- Dockerfile.nightly | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Dockerfile.nightly diff --git a/Dockerfile.nightly b/Dockerfile.nightly new file mode 100644 index 0000000..d05e050 --- /dev/null +++ b/Dockerfile.nightly @@ -0,0 +1,34 @@ +## DEVELOPMENT IMAGE +FROM node:15-alpine AS dev + +# Install pre-requisites +RUN apk add --no-cache git python3 + +# Fetch and build tileboard master branch +RUN mkdir /tileboard-source \ + && cd /tileboard-source/ \ + && git clone https://github.com/resoai/TileBoard . \ + && git checkout -b my-patch origin/master \ + && mkdir /tileboard \ + && ln -s /tileboard build \ + && yarn install \ + && yarn run build + +# Start Server +WORKDIR /tileboard +EXPOSE 8000 +EXPOSE 8080 +ENTRYPOINT ["/bin/sh", "-c", "yarn --cwd /tileboard-source run dev & python3 -m http.server"] + + + +## NIGHTLY BUILD IMAGE +FROM python:alpine AS nightly + +# Copy contents from dev image +COPY --from=dev /tileboard /tileboard + +# Start Server +WORKDIR /tileboard +EXPOSE 8000 +ENTRYPOINT python3 -m http.server \ No newline at end of file