<|start_filename|>derived_images/kubectl/Dockerfile<|end_filename|>
FROM opensuse:42.2
LABEL maintainer "<NAME> <<EMAIL>>"

COPY rpm-import-repo-key /
RUN /rpm-import-repo-key <KEY> && \
    zypper ar obs://Virtualization:containers/openSUSE_Leap_42.2 Virtualization:containers && \
    zypper -n in -f kubernetes-client-1.6.1-17.3 && \
    zypper clean -a && \
    rm /rpm-import-repo-key


<|start_filename|>derived_images/yarn/Dockerfile<|end_filename|>
FROM opensuse/amd64:42.3
MAINTAINER SUSE Containers Team <<EMAIL>>

RUN mkdir -m 0600 /tmp/build && \
    gpg --homedir /tmp/build --keyserver ha.pool.sks-keyservers.net --recv-keys <KEY> && \
    gpg --homedir /tmp/build --export --armor <KEY> > /tmp/build/repo.key && \
    rpm --import /tmp/build/repo.key && \
    rm -rf /tmp/build && \
    # Now add the repository and install yarn.
    zypper ar -f obs://Virtualization:containers:Portus/openSUSE_Leap_42.3 portus && \
    zypper ref && \
    zypper -n in --from portus nodejs6 yarn && \
    # Remove unneeded packages and clean stuff.
    zypper -n rm kbd-legacy && \
    zypper clean -a


<|start_filename|>derived_images/systemd/Dockerfile<|end_filename|>
FROM opensuse:latest
MAINTAINER <NAME> <<EMAIL>>

ENV container docker

RUN zypper -n install systemd; zypper clean ; \
(cd /usr/lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /usr/lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /usr/lib/systemd/system/local-fs.target.wants/*; \
rm -f /usr/lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /usr/lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /usr/lib/systemd/system/basic.target.wants/*;\
rm -f /usr/lib/systemd/system/anaconda.target.wants/*;

VOLUME [ "/sys/fs/cgroup" ]
CMD ["/usr/lib/systemd/systemd", "--system"]


<|start_filename|>derived_images/portus/Dockerfile<|end_filename|>
FROM opensuse/leap:15.0
MAINTAINER SUSE Containers Team <<EMAIL>>

# Install the entrypoint of this image.
COPY init /

# Install Portus and prepare the /certificates directory.
RUN chmod +x /init && \
    # Fetch the key from the obs://Virtualization:containers:Portus
    # project. Sometimes the key server times out or has some other problem. In
    # that case, we fall back to alternative key servers.
    TMPDIR=/tmp/build && \
    mkdir -m 0600 $TMPDIR && \
    for key in <KEY>
               <KEY>; do \
      found=''; \
      for server in \
        hkp://keys.gnupg.net:80 \
        ha.pool.sks-keyservers.net \
        hkp://keyserver.ubuntu.com:80 \
        hkp://p80.pool.sks-keyservers.net:80 \
        pgp.mit.edu \
      ; do \
        echo "Fetching GPG key $GPG_KEY from $server"; \
        gpg --homedir $TMPDIR --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$key" && found=yes && break; \
      done; \
      test -z "$found" && echo >&2 "error: failed to fetch GPG key $key" && exit 1; \
      gpg --homedir $TMPDIR --export --armor $key > $TMPDIR/repo.key && \
      rpm --import $TMPDIR/repo.key ; \
    done; \
    rm -rf $TMPDIR && \
    # Now add the repository and install portus.
    zypper ar -f obs://devel:languages:ruby/openSUSE_Leap_15.0 ruby && \
    zypper ar -p 1 -f obs://Virtualization:containers:Portus/openSUSE_Leap_15.0 portus && \
    zypper ref -f && \
    zypper -n in --from portus --details ruby-common portus && \
    zypper clean -a && \
    # Prepare the certificates directory.
    rm -rf /etc/pki/trust/anchors && \
    ln -sf /certificates /etc/pki/trust/anchors

EXPOSE 3000
ENTRYPOINT ["/init"]


<|start_filename|>derived_images/etcd/Dockerfile<|end_filename|>
FROM opensuse:leap
MAINTAINER SUSE Containers Team <<EMAIL>>

RUN zypper ar -Gf http://download.opensuse.org/repositories/Virtualization:/containers/openSUSE_Leap_42.2/ containers && \
    zypper ref && \
    zypper -n in etcd && \
    zypper clean -a

CMD etcd


<|start_filename|>derived_images/salt/salt-api/Dockerfile<|end_filename|>
FROM opensuse:leap
MAINTAINER SUSE Containers Team <<EMAIL>>

RUN zypper ref && \
    zypper -n in salt-api && \
    zypper clean -a

CMD salt-api


<|start_filename|>derived_images/clair/Dockerfile<|end_filename|>
FROM opensuse/amd64:42.3
MAINTAINER SUSE Containers Team <<EMAIL>>

VOLUME /config
EXPOSE 6060 6061

# Install Portus and prepare the /certificates directory.
RUN mkdir -m 0600 /tmp/build && \
    # Fetch the key from the obs://Virtualization:containers:Portus project.
    gpg --homedir /tmp/build --keyserver ha.pool.sks-keyservers.net --recv-keys <KEY> && \
    gpg --homedir /tmp/build --export --armor <KEY> > /tmp/build/repo.key && \
    rpm --import /tmp/build/repo.key && \
    rm -rf /tmp/build && \
    # Now add the repository and installa clair.
    zypper ar -f obs://Virtualization:containers/openSUSE_Leap_42.3 "Virtualization:containers" && \
    zypper ref && \
    zypper -n in clair && \
    # Remove unneeded packages and clean stuff.
    zypper -n rm kbd-legacy && \
    zypper clean -a && \
    # Prepare the certificates directory.
    rm -rf /etc/pki/trust/anchors && \
    ln -sf /certificates /etc/pki/trust/anchors

ENTRYPOINT ["/usr/bin/clair"]


<|start_filename|>derived_images/registry/Dockerfile<|end_filename|>
FROM opensuse/leap:15
MAINTAINER SUSE Containers Team <<EMAIL>>

# Install the entrypoint of this image.
COPY init /

RUN chmod +x /init && \
    zypper ref && \
    zypper -n in docker-distribution-registry && \
    zypper clean -a

VOLUME ["/var/lib/docker-registry"]
EXPOSE 5000
ENTRYPOINT ["/init"]


<|start_filename|>derived_images/python/Dockerfile<|end_filename|>
FROM opensuse:42.1
MAINTAINER SUSE <NAME> <<EMAIL>>

# Only python is added
RUN zypper in -y python


<|start_filename|>derived_images/ruby/Dockerfile<|end_filename|>
FROM opensuse/amd64:42.3
MAINTAINER SUSE Containers Team <<EMAIL>>

RUN zypper -n in --no-recommends ruby && \
    zypper clean -a


<|start_filename|>derived_images/salt/salt-master/Dockerfile<|end_filename|>
FROM opensuse:leap
MAINTAINER SUSE Containers Team <<EMAIL>>

RUN zypper ref && \
    zypper -n in salt-master python-MySQL-python && \
    zypper clean -a

RUN useradd -MNrs /bin/false saltapi
RUN echo "saltapi:saltapi" | chpasswd

CMD salt-master


<|start_filename|>derived_images/salt/salt-minion/Dockerfile<|end_filename|>
FROM opensuse:leap
MAINTAINER SUSE Containers Team <<EMAIL>>

RUN zypper ref && \
    zypper -n in salt-minion python-M2Crypto && \
    zypper clean -a

ADD salt-minion.sh /

CMD /salt-minion.sh
