-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (28 loc) · 939 Bytes
/
Dockerfile
File metadata and controls
39 lines (28 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# simple vue-cli docker installation
# docker build -t vuepress
# or specify vuepresscd wo version
# build --build-arg VUEPRESS_VERSION= .
FROM crowdcode/vue-cli:latest
# alternative to reduce size instead of alpine, but does not
# include build tools for native compilation of npm packages
# FROM node:8-slim
LABEL maintainer="development@crowdcode.io" \
description="Simple vuepress docker container"
ARG VUEPRESS_VERSION=0.14.8
ENV VUEPRESS_VERSION ${VUEPRESS_VERSION}
ARG USER_ID=1000
ARG USER_HOME_DIR="/build"
ARG WORKSPACE_DIR="/workspace"
ENV NPM_CONFIG_LOGLEVEL info
ENV HOME "$USER_HOME_DIR"
WORKDIR ${USER_HOME_DIR}
RUN set -xe \
&& npm install -g vuepress@${VUEPRESS_VERSION} \
&& npm cache clean --force
# not declared to avoid anonymous volume leak
# VOLUME "$USER_HOME_DIR/.cache/yarn"
# VOLUME "$APP_DIR/"
WORKDIR $WORKSPACE_DIR
EXPOSE 8080
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
USER ${USER_ID}