Open ajeetraina opened 3 years ago
add sed -i 's/15.0/15.1/g' /etc/zypp/repos.d/*
to the first line of the RUN
command in Dockerfile
and change the all 15.0
to 15.1
FROM opensuse/ruby:2.6
MAINTAINER SUSE Containers Team <containers@suse.com>
ENV COMPOSE=1
EXPOSE 3000
WORKDIR /srv/Portus
COPY Gemfile* ./
# Let's explain this RUN command:
# 1. First of all we add d:l:go repo to get the latest go version.
# 2. Then refresh, since opensuse/ruby does zypper clean -a in the end.
# 3. Then we install dev. dependencies and the devel_basis pattern (used for
# building stuff like nokogiri). With that we can run bundle install.
# 4. We then proceed to remove unneeded clutter: first we remove some packages
# installed with the devel_basis pattern, and finally we zypper clean -a.
RUN sed -i 's/15.0/15.1/g' /etc/zypp/repos.d/* && \
zypper addrepo https://download.opensuse.org/repositories/devel:languages:go/openSUSE_Leap_15.1/devel:languages:go.repo && \
zypper addrepo https://download.opensuse.org/repositories/devel:/tools/openSUSE_Leap_15.1/ devel:tools && \
zypper --gpg-auto-import-keys ref && \
zypper -n in --no-recommends ruby2.6-devel \
libmariadb-devel postgresql-devel \
nodejs libxml2-devel libxslt1 git-core \
go1.10 phantomjs gcc-c++ && \
zypper -n in --no-recommends -t pattern devel_basis && \
gem install bundler --no-document -v 1.17.3 && \
update-alternatives --install /usr/bin/bundle bundle /usr/bin/bundle.ruby2.6 3 && \
update-alternatives --install /usr/bin/bundler bundler /usr/bin/bundler.ruby2.6 3 && \
bundle install --retry=3 && \
go get -u github.com/vbatts/git-validation && \
go get -u github.com/openSUSE/portusctl && \
mv /root/go/bin/git-validation /usr/local/bin/ && \
mv /root/go/bin/portusctl /usr/local/bin/ && \
zypper -n rm wicked wicked-service autoconf automake \
binutils bison cpp flex gdbm-devel gettext-tools \
libtool m4 make makeinfo && \
zypper clean -a
ADD . .
It still fails:
uilding repository 'The Go Programming Language (openSUSE_Leap_15.1)' cache [....done]
Retrieving repository 'openSUSE-Leap-15.0-Non-Oss' metadata [..done]
Building repository 'openSUSE-Leap-15.0-Non-Oss' cache [....done]
Retrieving repository 'openSUSE-Leap-15.0-Oss' metadata [...done]
Building repository 'openSUSE-Leap-15.0-Oss' cache [....done]
Retrieving repository 'openSUSE-Leap-15.0-Update' metadata [....done]
Building repository 'openSUSE-Leap-15.0-Update' cache [....done]
Retrieving repository 'openSUSE-Leap-15.0-Update-Non-Oss' metadata [..done]
Building repository 'openSUSE-Leap-15.0-Update-Non-Oss' cache [....done]
Retrieving repository 'ruby' metadata [.error]
Repository 'ruby' is invalid.
[ruby|https://download.opensuse.org/repositories/devel:/languages:/ruby/openSUSE_Leap_15.0] Valid metadata not found at specified URL
Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository 'ruby' because of the above error.
Some of the repositories have not been refreshed because of an error.
ERROR: Service 'portus' failed to build: The command '/bin/sh -c zypper addrepo https://download.opensuse.org/repositories/devel:languages:go/openSUSE_Leap_15.1/devel:languages:go.repo && zypper addrepo https://download.opensuse.org/repositories/devel:/tools/openSUSE_Leap_15.1/ devel:tools && zypper --gpg-auto-import-keys ref && zypper -n in --no-recommends ruby2.6-devel libmariadb-devel postgresql-devel nodejs libxml2-devel libxslt1 git-core go1.10 phantomjs gcc-c++ && zypper -n in --no-recommends -t pattern devel_basis && gem install bundler --no-document -v 1.17.3 && update-alternatives --install /usr/bin/bundle bundle /usr/bin/bundle.ruby2.6 3 && update-alternatives --install /usr/bin/bundler bundler /usr/bin/bundler.ruby2.6 3 && bundle install --retry=3 && go get -u github.com/vbatts/git-validation && go get -u github.com/openSUSE/portusctl && mv /root/go/bin/git-validation /usr/local/bin/ && mv /root/go/bin/portusctl /usr/local/bin/ && zypper -n rm wicked wicked-service autoconf automake binutils bison cpp flex gdbm-devel gettext-tools libtool m4 make makeinfo && zypper clean -a' returned a non-zero code: 4
I will try to add zypper update and see if it works.
add
sed -i 's/15.0/15.1/g' /etc/zypp/repos.d/*
to the first line of theRUN
command in Dockerfile and change the all15.0
to15.1
FROM opensuse/ruby:2.6 MAINTAINER SUSE Containers Team <containers@suse.com> ENV COMPOSE=1 EXPOSE 3000 WORKDIR /srv/Portus COPY Gemfile* ./ # Let's explain this RUN command: # 1. First of all we add d:l:go repo to get the latest go version. # 2. Then refresh, since opensuse/ruby does zypper clean -a in the end. # 3. Then we install dev. dependencies and the devel_basis pattern (used for # building stuff like nokogiri). With that we can run bundle install. # 4. We then proceed to remove unneeded clutter: first we remove some packages # installed with the devel_basis pattern, and finally we zypper clean -a. RUN sed -i 's/15.0/15.1/g' /etc/zypp/repos.d/* && \ zypper addrepo https://download.opensuse.org/repositories/devel:languages:go/openSUSE_Leap_15.1/devel:languages:go.repo && \ zypper addrepo https://download.opensuse.org/repositories/devel:/tools/openSUSE_Leap_15.1/ devel:tools && \ zypper --gpg-auto-import-keys ref && \ zypper -n in --no-recommends ruby2.6-devel \ libmariadb-devel postgresql-devel \ nodejs libxml2-devel libxslt1 git-core \ go1.10 phantomjs gcc-c++ && \ zypper -n in --no-recommends -t pattern devel_basis && \ gem install bundler --no-document -v 1.17.3 && \ update-alternatives --install /usr/bin/bundle bundle /usr/bin/bundle.ruby2.6 3 && \ update-alternatives --install /usr/bin/bundler bundler /usr/bin/bundler.ruby2.6 3 && \ bundle install --retry=3 && \ go get -u github.com/vbatts/git-validation && \ go get -u github.com/openSUSE/portusctl && \ mv /root/go/bin/git-validation /usr/local/bin/ && \ mv /root/go/bin/portusctl /usr/local/bin/ && \ zypper -n rm wicked wicked-service autoconf automake \ binutils bison cpp flex gdbm-devel gettext-tools \ libtool m4 make makeinfo && \ zypper clean -a ADD . .
Worked for me on master
Thanks for all your contributions! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
same trouble here...
I am facing issue deploying Portus on https://play-with-docker.com Docker Playground. Look like it is pointing to old repo.
Steps to reproduce: