Git Product home page Git Product logo

container-feeder's Introduction

Build Status

container-feeder

This is a simple program that looks for all the Docker images shipped by RPMs, finds the ones that are not available to the Docker daemon running on the local machine and imports the missing ones.

This is a temporary solution needed until SUSE hosts its own image repository.

Building

Checkout the code and then run:

make build

This project uses hellogopher to simplify the building aspects of it.

The container-feeder binary can be found under the bin/ directory.

Usage

To import all the missing RPM images:

./container-feeder

It's possible to specify the name of the directory containing all the .tar.xz files:

./container-feeder --dir <path to dir>

By default the program will look for the images under /usr/share/suse-docker-images/native.

Limitations

This program will "docker load" all the .tar.xz images that have to be available to the local docker daemon.

These images must be native docker images, they cannot be tarballs containing just the root filesystem of the image. Hence it's not possible to import the pre-built Docker images that are currently shipped by SUSE.

License

container-feeder is licensed under the terms of the Apache 2.0 license.

container-feeder: import Linux container images delivered as RPMs
Copyright 2017 SUSE LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

container-feeder's People

Contributors

cyphar avatar davidcassany avatar ereslibre avatar flavio avatar grahamhayes avatar inercia avatar jordimassaguerpla avatar kiall avatar maximilianmeister avatar mjura avatar mssola avatar pi-victor avatar vrothberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

container-feeder's Issues

Ensure only new images are loaded

container-feeder should load only the pre-built images that have not yet been activated. This will reduce the start-up time of the service.

Whitelist of images to be imported

We should allow a list of images to be imported, so not all images get imported under all circumstances.

Specifically, we for example might be only interested in loading the pause container on the workers without having to load velum, salt-minion, salt-api, salt-master... So in this context we could run container-feeder sles12/pause and only the images provided in this list would be imported.

Failed by parsing image name '<none>:<none>'

systemctl status container-feeder -l

Sep 04 10:03:51 widk8s19 container-feeder[3385]: time="2018-09-04T10:03:51+02:00" level=error msg="Something went wrong while importing the images: error parsing image name '<none>:<none>': invalid reference format
โ— container-feeder.service - Load all docker images that are packaged in RPM
   Loaded: loaded (/usr/lib/systemd/system/container-feeder.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2018-09-04 10:03:51 CEST; 16min ago
 Main PID: 3385 (code=exited, status=1/FAILURE)

Sep 04 10:03:48 widk8s19 container-feeder[3385]: time="2018-09-04T10:03:48+02:00" level=debug msg="Feeder target 'docker': using DockerFeeder"
Sep 04 10:03:48 widk8s19 container-feeder[3385]: time="2018-09-04T10:03:48+02:00" level=debug msg="Trying to import images from /usr/share/suse-docker-images/native"
Sep 04 10:03:48 widk8s19 container-feeder[3385]: time="2018-09-04T10:03:48+02:00" level=debug msg="Searching images in /usr/share/suse-docker-images/native"
Sep 04 10:03:51 widk8s19 container-feeder[3385]: time="2018-09-04T10:03:51+02:00" level=debug msg="Found the following RPM images: map[docker.io/sles12/tiller:2.8.2:/usr/share/suse-docker-images/native/sles12-helm-tiller.x86_64-3.0.0-Build2.33.docker.tar.xz docker.io/sles12/mariadb:10.0:/usr/share/suse-docker-images/native/sles12-mariadb.x86_64-3.0.0-Build2.14.docker.tar.xz docker.io/sles12/salt-api:2016.11.4:/usr/share/suse-docker-images/native/sles12-salt-api.x86_64-3.0.0-Build1.96.docker.tar.xz docker.io/sles12/salt-minion:2016.11.4:/usr/share/suse-docker-images/native/sles12-salt-minion.x86_64-3.0.0-Build1.96.docker.tar.xz docker.io/sles12/pv-recycler-node:1.0.0:/usr/share/suse-docker-images/native/pv-recycler-node.x86_64-3.0.0-Build1.98.docker.tar.xz docker.io/sles12/caasp-dex:2.7.1:/usr/share/suse-docker-images/native/sles12-caasp-dex.x86_64-3.0.0-Build2.91.docker.tar.xz docker.io/sles12/dnsmasq-nanny:1.0.0:/usr/share/suse-docker-images/native/sles12-dnsmasq-nanny.x86_64-3.0.0-Build1.101.docker.tar.xz docker.io/sles12/flannel:0.9.1:/usr/share/suse-docker-images/native/sles12-flannel.x86_64-3.0.0-Build2.90.docker.tar.xz docker.io/sles12/pause:1.0.0:/usr/share/suse-docker-images/native/pause.x86_64-3.0.0-Build1.97.docker.tar.xz docker.io/sles12/openldap:10.0:/usr/share/suse-docker-images/native/sles12-openldap.x86_64-3.0.0-Build2.24.docker.tar.xz docker.io/sles12/salt-master:2016.11.4:/usr/share/suse-docker-images/native/sles12-salt-master.x86_64-3.0.0-Build2.76.docker.tar.xz docker.io/sles12/sidecar:1.0.0:/usr/share/suse-docker-images/native/sles12-sidecar.x86_64-3.0.0-Build1.99.docker.tar.xz docker.io/sles12/haproxy:1.6.0:/usr/share/suse-docker-images/native/sles12-haproxy.x86_64-3.0.0-Build1.99.docker.tar.xz docker.io/sles12/kubedns:1.0.0:/usr/share/suse-docker-images/native/sles12-kubedns.x86_64-3.0.0-Build1.100.docker.tar.xz docker.io/sles12/velum:0.0:/usr/share/suse-docker-images/native/sles12-velum.x86_64-3.0.0-Build1.109.docker.tar.xz]"
Sep 04 10:03:51 widk8s19 container-feeder[3385]: time="2018-09-04T10:03:51+02:00" level=error msg="Something went wrong while importing the images: error parsing image name '<none>:<none>': invalid reference format
Sep 04 10:03:51 widk8s19 container-feeder[3385]: "
Sep 04 10:03:51 widk8s19 systemd[1]: container-feeder.service: Main process exited, code=exited, status=1/FAILURE
Sep 04 10:03:51 widk8s19 systemd[1]: Failed to start Load all docker images that are packaged in RPM.
Sep 04 10:03:51 widk8s19 systemd[1]: container-feeder.service: Unit entered failed state.
Sep 04 10:03:51 widk8s19 systemd[1]: container-feeder.service: Failed with result 'exit-code'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.