shlink-web-client/Dockerfile

22 lines
620 B
Text
Raw Normal View History

FROM nginx:1.15.7-alpine
2018-06-17 09:04:53 +03:00
MAINTAINER Alejandro Celaya <alejandro@alejandrocelaya.com>
# Install node and yarn
RUN apk add --no-cache --virtual nodejs && apk add --no-cache --virtual yarn
2018-06-17 09:04:53 +03:00
ADD . ./shlink-web-client
2018-06-17 09:04:53 +03:00
# Install dependencies and build project
RUN cd ./shlink-web-client && \
2018-06-17 09:04:53 +03:00
yarn install && \
yarn build && \
# Move build contents to document root
cd .. && \
rm -r /usr/share/nginx/html/* && \
mv ./shlink-web-client/build/* /usr/share/nginx/html && \
rm -r ./shlink-web-client && \
# Delete and uninstall build tools
yarn cache clean && apk del yarn && apk del nodejs