dockerfile部署achain钱包
dockerfile部署achain钱包
FROM ubuntu:16.04
USER root
WORKDIR /root
# Ubuntu必备操作,这里不用使用-e也会换行...... 用了-e 反而报错,奇迹
RUN echo "deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse" > /etc/apt/sources.list \
&& echo "deb http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse" >> /etc/apt/sources.list \
&& echo "deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse" >> /etc/apt/sources.list \
&& echo "deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse" >> /etc/apt/sources.list \
&& echo "deb http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse" >> /etc/apt/sources.list \
&& echo "deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse" >> /etc/apt/sources.list \
&& echo "deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse" >> /etc/apt/sources.list \
&& echo "deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse" >> /etc/apt/sources.list \
&& echo "deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse" >> /etc/apt/sources.list \
&& echo "deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse" >> /etc/apt/sources.list \
&& apt-get -y clean \
&& apt-get -y update \
&& echo "set paste" >> ~/.vimrc \
&& echo "set encoding=utf-8" >> ~/.vimrc \
&& echo "set fileencodings=gb2312,utf-8" >> ~/.vimrc \
&& echo "set fileencoding=gb2312" >> ~/.vimrc \
&& echo "set termencoding=utf-8" >> ~/.vimrc \
&& echo "set nu" >> ~/.vimrc \
&& echo "set ts=4" >> ~/.vimrc \
&& echo "set confirm" >> ~/.vimrc \
&& echo "syntax on" >> ~/.vimrc \
&& echo "set showmatch" >> ~/.vimrc \
&& echo "set encoding=utf-8" >> ~/.vimrc \
&& echo "set shiftwidth=4" >> ~/.vimrc \
&& echo "set ai" >> ~/.vimrc \
&& echo "set ruler" >> ~/.vimrc \
&& echo "set helplang=cn" >> ~/.vimrc \
&& echo "set hlsearch" >> ~/.vimrc \
&& echo "set cursorline" >> ~/.vimrc \
&& echo "set laststatus=2" >> ~/.vimrc \
&& echo "set flash" >> ~/.vimrc \
&& echo "set autoindent" >> ~/.vimrc \
&& echo "set smartindent" >> ~/.vimrc \
&& echo "set hls" >> ~/.vimrc \
&& echo "set hlsearch" >> ~/.vimrc \
&& echo "set lbr" >> ~/.vimrc \
&& echo "set nowrap" >> ~/.vimrc \
&& echo "set nows" >> ~/.vimrc \
&& echo "filetype plugin on" >> ~/.vimrc \
&& echo "autocmd FileType php set omnifunc=phpcomplete#CompletePHP" >> ~/.vimrc \
&& echo "autocmd FileType lua set omnifunc=luacomplete#CompleteLUA" >> ~/.vimrc \
&& echo "autocmd FileType python set omnifunc=pythoncomplete#CompletePYTHON" >> ~/.vimrc \
&& echo "autocmd FileType bash set omnifunc=bashcomplete#CompleteBASH" >> ~/.vimrc \
# Ubuntu必备软件
&& apt-get -y install curl vim \
&& apt-get -y install net-tools \
&& apt-get -y install iputils-ping \
# 钱包依赖
&& apt-get -y install wget sudo git \
# 常用软件
&& apt-get -y install shadow河蟹socks \
#&& `nohup sslocal -s www.yxbang.cn -p 7002 -b 127.0.0.1 -l 1080 -k '!(password)' -m aes-256-cfb >> ~/sslocal.log >> /dev/null&` \
#&& export ALL_PROXY=socks5://127.0.0.1:1080 \
#&& git config --global http.proxy 'socks5://127.0.0.1:1080' \
#&& git config --global https.proxy 'socks5://127.0.0.1:1080' \
# Achain钱包依赖
&& apt-get -y install cmake git libreadline-dev uuid-dev g++ libncurses5-dev zip libssl-dev openssl pkg-config build-essential python-dev autoconf autotools-dev libicu-dev libbz2-dev libboost-dev libboost-all-dev \
&& apt-get -y install ntp \
&& apt-get -y install ntpdate \
&& git clone https://github.com/Achain-Dev/Achain.git \
# Achain需要授时
&& echo "service ntp stop \n ntpdate -s time.nist.gov \n service ntp start" > date.sh
# 注意这里如果不是用ROOT用户启动的话,需要用sudo,文档没有指出,但是在运行有一步命令的时候需要用的sudo,具体我忘了
# 而且前面安装sudo 还有一个好处,如果你想新建多个用户的话,也会很方便echo 'liuhao ALL=(ALL:ALL) ALL' >> /etc/sudoers
# 好像是leveldb-1.20需要,主要如果上面不安装sudo 的话这里也会报错
# 因为钱包编译文件里有sudo 命令,除非你愿意手动删除,否则就要apt-get instal xxx
# 注意wget也是必须的,有些文件他是用wget下载还有git
CMD ./date.sh && cd /root/Achain/ && ./build_ubuntu.sh download
本文来自博客园,作者:我爱吃炒鸡,转载请注明原文链接:https://www.cnblogs.com/chinaliuhan/p/15558400.html