Dockerfile.12sp3
FROM registry.scc.suse.de/suse/sles12:sp3
ENV PRODUCT SLE_12_SP3
ENV BUILT_AT "Tue May 17 0:42 CET 2017"
RUN useradd --no-log-init --create-home scc
ARG OBS_USER
ARG OBS_PASSWORD
RUN zypper --non-interactive ar http://download.suse.de/ibs/SUSE/Products/SLE-SERVER/12-SP3/x86_64/product/ SLE-12-SP3-standard &&\
zypper ar -f http://download.suse.de/ibs/SUSE/Updates/SLE-SERVER/12-SP3/x86_64/update/ SLE-12-SP3-updates &&\
zypper ar http://download.suse.de/ibs/SUSE/Products/SLE-SDK/12-SP3/x86_64/product/ sle12sp3sdk &&\
zypper ar http://download.suse.de/ibs/SUSE/Updates/SLE-SDK/12-SP3/x86_64/update/ sle12sp3sdk-updates &&\
zypper --non-interactive --gpg-auto-import-keys ref &&\
zypper --non-interactive up zypper &&\
zypper --non-interactive install git-core ruby-devel make gcc gcc-c++ build wget dmidecode \
vim osc ruby2.1-rubygem-gem2rpm hwinfo libx86emu1 zypper-migration-plugin sudo curl && \
zypper --non-interactive rr SLE-12-SP3-standard SLE-12-SP3-updates sle12sp3sdk sle12sp3sdk-updates
COPY integration/create-oscrc.sh /tmp/connect/integration/create-oscrc.sh
RUN sh /tmp/connect/integration/create-oscrc.sh
RUN echo 'gem: --no-ri --no-rdoc' > /etc/gemrc && \
gem install bundler --version '~> 1.17' --no-document
RUN mkdir -p /tmp/connect/lib/suse/connect
WORKDIR /tmp/connect
COPY Gemfile .
COPY suse-connect.gemspec .
COPY lib/suse/connect/version.rb ./lib/suse/connect/
RUN bundle config jobs $(nproc) && \
bundle install
COPY . /tmp/connect
RUN chown -R scc /tmp/connect