This repository has been archived on 2021-06-21. You can view files and clone it, but cannot push or open issues or pull requests.
fbrinker-tileboard/Dockerfile.nightly

42 lines
1.0 KiB
Docker
Raw Normal View History

## DEVELOPMENT IMAGE
ARG DEVPLATFORM=${TARGETPLATFORM:-linux/amd64}
FROM --platform=$DEVPLATFORM node:15-alpine AS dev
# Install pre-requisites
2021-05-19 15:36:46 +00:00
ARG DEVPLATFORM
2021-05-19 15:33:08 +00:00
RUN echo DEVPLATFORM: $DEVPLATFORM \
&& case $DEVPLATFORM in \
*arm*) apk add --no-cache git python3 build-base ;; \
*) apk add --no-cache git python3 ;; \
esac
# 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 \
&& npm install --global node-sass \
&& 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