Skip to content

Instantly share code, notes, and snippets.

@Hellowor1d
Last active September 21, 2018 14:59
Show Gist options
  • Save Hellowor1d/8630d17cc68b14f45797d4ba5db74895 to your computer and use it in GitHub Desktop.
Save Hellowor1d/8630d17cc68b14f45797d4ba5db74895 to your computer and use it in GitHub Desktop.
dockerfile-fe-env
FROM mhart/alpine-node:10
MAINTAINER Hellowor1d <103459776@qq.com>
# 添加挂载点
VOLUME [ "/app" ]
# 设置默认工作目录
WORKDIR /app
# 更新安装源
# (科大镜像)
# RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
# (阿里云镜像)
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
# 安装基础库
RUN apk add --no-cache \
python \
make \
gcc \
g++ \
cairo-dev \
jpeg-dev \
pango-dev \
giflib-dev
RUN npm install -g @vue/cli nrm --registry=https://registry.npm.taobao.org \
&& nrm use taobao
# 设置容器端口
EXPOSE 8080/tcp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment