Registry

2 minute read

一般形式 在官方文档,或者百度谷歌,搜到的portus一般都是compose形式搭建,这样好处是操作无脑 但是一般情况下我们肯定是自己要更灵活一些的,肯定用docker容器形式更舒服一点。可是去dockerhub一搜,各种版本的镜像,查看dockerfile很多人都自己加了一些内容,对于不会ruby的人来说,并不知道那些操作都说干啥的。 自己研究研究 github master分支上有dockerfile,如下 FROM library/rails:4.2.2 MAINTAINER Flavio Castelli <fcastelli@suse.com> ENV COMPOSE=1 EXPOSE 3000 WORKDIR /portus COPY Gemfile* ./ RUN bundle install –retry=3 # Install phantomjs, this is required for testing and development purposes # There are no official deb packages for it, hence we built it inside of the # open build service. RUN echo "deb http://download.opensuse.org/repositories/home:/flavio_castelli:/phantomjs/Debian_8.0/ ./" >> /etc/apt/sources.list RUN wget http://download.opensuse.org/repositories/home:/flavio_castelli:/phantomjs/Debian_8.0/Release.key && \ apt-key add Release.