easydawin Dockerfile

FROM centos:7
MAINTAINER EX-ZHAOJIKUN001
RUN yum install -y git
RUN yum -y install lrzsz
#RUN yum -y install initscripts
RUN yum install -y epel-release
RUN yum -y install patch make gcc g++
RUN yum -y  install deltarpm
RUN yum -y install gcc gcc-c++ perl ld-linux.so.2 libstdc++.so.6
RUN yum install go -y
RUN touch /etc/profile.d/go.sh
RUN chmod +x /etc/profile.d/go.sh
RUN echo  'export PATH=$PATH:/usr/local/go/bin' >> /etc/profile.d/go.sh
RUN source /etc/profile.d/go.sh
RUN mkdir -p ~/home/user/go
RUN touch /etc/profile.d/gopath.sh
RUN echo  'export GOPATH=/home/user/go' >> /etc/profile.d/gopath.sh
RUN source /etc/profile.d/gopath.sh
RUN yum install -y wget
#RUN curl -sL https://rpm.nodesource.com/setup_14.x | bash -
RUN yum -y install nodejs
RUN go get -u -v github.com/kardianos/govendor
RUN go get -u -v github.com/penggy/gobuild
RUN npm i -g apidoc
RUN npm i -g rimraf
WORKDIR /home/user/go/src/github.com
RUN mkdir EasyDarwin
WORKDIR /home/user/go/src/github.com/EasyDarwin
#WORKDIR /home/user/go/src/github.com/EasyDarwin/EasyDarwin
RUN git clone  https://github.com/EasyDarwin/EasyDarwin.git --depth=1 EasyDarwin
RUN npm install

WORKDIR /home/user/go/src/github.com/EasyDarwin/EasyDarwin/rtsp
RUN sed -i '519a v1 := req.Header["Accept"]' rtsp-session.go
RUN sed -i '520a res.Header["Content-type"] =v1' rtsp-session.go
RUN sed -i '520s/^/                /' rtsp-session.go
RUN sed -i '521s/^/                /' rtsp-session.go
WORKDIR /home/user/go/src/github.com/EasyDarwin/
#RUN npm install
#RUN curl -sL https://rpm.nodesource.com/setup_14.x | bash -
#RUN yum -y install nodejs
RUN wget https://npm.taobao.org/mirrors/node/v10.15.1/node-v10.15.1-linux-x64.tar.gz
RUN tar -xvf node-v10.15.1-linux-x64.tar.gz
RUN mv node-v10.15.1-linux-x64 /usr/local/node
RUN chmod +x /etc/profile
RUN sed -i '74a export NODE_HOME=/usr/local/node' /etc/profile
RUN sed -i '75a export PATH=$NODE_HOME/bin:$PATH' /etc/profile
RUN source /etc/profile
WORKDIR /home/user/go/src/github.com/EasyDarwin/EasyDarwin/
RUN wget https://npm.taobao.org/mirrors/node/v10.15.1/node-v10.15.1-linux-x64.tar.gz
RUN tar -xvf node-v10.15.1-linux-x64.tar.gz
RUN mv node-v10.15.1-linux-x64 /usr/local/node
#RUN sed -i '74a export NODE_HOME=/usr/local/node' /etc/profile
#RUN sed -i '75a export PATH=$NODE_HOME/bin:$PATH' /etc/profile
ENTRYPOINT source /etc/profile && npm run dev && ./EasyDarwin.exe
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值