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
easydawin Dockerfile
最新推荐文章于 2024-04-24 10:06:48 发布