{"id":22914098,"url":"https://github.com/suse/sle2docker","last_synced_at":"2025-08-12T09:30:48.555Z","repository":{"id":19653296,"uuid":"22906065","full_name":"SUSE/sle2docker","owner":"SUSE","description":"This is a tool which facilitates the creation of SLE containers for Docker.","archived":false,"fork":false,"pushed_at":"2018-02-26T09:05:43.000Z","size":113,"stargazers_count":38,"open_issues_count":3,"forks_count":12,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-07-28T15:53:23.978Z","etag":null,"topics":["docker","rpm","ruby","sles","suse"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SUSE.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-13T07:05:17.000Z","updated_at":"2024-03-20T17:27:16.000Z","dependencies_parsed_at":"2022-08-24T14:05:42.187Z","dependency_job_id":null,"html_url":"https://github.com/SUSE/sle2docker","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/SUSE/sle2docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUSE%2Fsle2docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUSE%2Fsle2docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUSE%2Fsle2docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUSE%2Fsle2docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SUSE","download_url":"https://codeload.github.com/SUSE/sle2docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUSE%2Fsle2docker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270038457,"owners_count":24516524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","rpm","ruby","sles","suse"],"created_at":"2024-12-14T05:13:19.942Z","updated_at":"2025-08-12T09:30:48.229Z","avatar_url":"https://github.com/SUSE.png","language":"Ruby","readme":"[![Build Status](https://travis-ci.org/SUSE/sle2docker.svg)](https://travis-ci.org/SUSE/sle2docker)\n[![Code Climate](https://codeclimate.com/github/SUSE/sle2docker/badges/gpa.svg)](https://codeclimate.com/github/SUSE/sle2docker)\n[![Test Coverage](https://codeclimate.com/github/SUSE/sle2docker/badges/coverage.svg)](https://codeclimate.com/github/SUSE/sle2docker)\n\nsle2docker is a convenience tool which imports the pre-built SUSE Linux Enterprise\nimages for Docker.\n\nThe tool takes advantage of pre-built Docker images distributed by SUSE to\ncreate the base Docker image that users can later customize using Docker's\nintegrated build system. The pre-built images are distributed by SUSE as RPMs.\n\nPre-built images do not have repositories configured but zypper will\nautomatically have access to the right repositories when the Docker host has a\nSLE subscription that provides access to the product used in the image. For\nmore details read the \"Customizing the images\" section below.\n\nPrevious versions of the tool built the Docker images from KIWI templates\ndistributed by SUSE. This is no longer possible.\n\n# Requirements\n\nRuby is required to execute the sle2docker program.\n\nDocker must be running on the system and the user invoking sle2docker must\nhave the rights to interact with it.\n\n# Installation\n\nThe recommended way to install sle2docker is via zypper:\n\n```\nsudo zypper in sle2docker\n```\n\nHowever sle2docker can also be installed via gem:\n\n```\nsudo gem install --no-format-exec sle2docker\n```\n\nThe `--no-format-exec` is recommended otherwise the `sle2docker` binary will\nbe prefixed with the ruby version installed on the system (e.g.: the binary on\nSLE12 would be called `sle2docker.ruby2.1`).\n\n# Usage\n\nTo list the available pre-built images use the following command:\n\n```\nsle2docker list\nAvailable pre-built images:\n - sles11sp3-docker.x86_64-1.0.0-Build1.3\n - sles12-docker.x86_64-1.0.0-Build7.4\n```\n\nTo activate the pre-built image use the following command:\n\n`sle2docker activate IMAGE_NAME`\n\n# Customizing the images\n\nTo create custom Docker images based on the official ones use\n[Docker's integrated build system](http://docs.docker.com/reference/builder/).\n\nThe pre-built images do not have any repository configured. They\ncontain a [zypper service](https://github.com/SUSE/container-suseconnect) that\ncontacts either the SUSE Customer Center (SCC) or your Subscription\nManagement Tool (SMT) server according to the configuration of the SLE host\nrunning the Docker container. The service obtains the list of repositories\navailable for the product used by the Docker image.\n\nThere is no need to add any credential to the Docker image because the machine\ncredentials are automatically injected into the container by the docker daemon.\nThese are injected inside of the `/run/secrets` directory. The same applies to\nthe `/etc/SUSEConnect` file of the host system, which is automatically injected\ninto the `/run/secrets`.\n\nThe contents of the `/run/secrets` directory are never committed to a Docker\nimage, hence there's no risk of leaking your credentials.\n\nTo obtain the list of repositories invoke:\n\n`zypper ref -s`\n\nThis will automatically add all the repositories to your container. For each\nrepository added to the system a new file is going to be created under\n`/etc/zypp/repos.d`. The URLs of these repositories include an access token\nthat automatically expires after 12 hours. To renew the token just call the\n`zypper ref -s` command. It is totally fine, and secure, to commit these files\nto a Docker image.\n\nIf you want to use a different set of credentials, place a custom\n`/etc/zypp/credentials.d/SCCcredentials` with the machine credentials\nhaving the subscription you want to use inside of the Docker image.\nThe same applies to the `SUSEConnect` file: if you want to override the one\navailable on the host system running the Docker container you have to add a\ncustom `/etc/SUSEConnect` file inside of the Docker image.\n\n## Creating a custom SLE12 image\n\nThis Dockerfile creates a simple Docker image based on SLE12:\n\n```\nFROM suse/sles12:latest\n\nRUN zypper ref -s\nRUN zypper -n in vim\n```\n\nWhen the Docker host machine is registered against an internal SMT\nserver the Docker image requires the ssl certificate used by SMT:\n\n```\nFROM suse/sles12:latest\n\n# Import the crt file of our private SMT server\nADD http://smt.test.lan/smt.crt /etc/pki/trust/anchors/smt.crt\nRUN update-ca-certificates\n\nRUN zypper ref -s\nRUN zypper -n in vim\n```\n\n## Creating a custom SLE11SP3 image\n\nThis Dockerfile creates a simple Docker image based on SLE11:\n\n```\nFROM suse/sles11sp3:latest\n\nRUN zypper ref -s\nRUN zypper -n in vim\n```\n\nWhen the Docker host machine is registered against an internal SMT\nserver the Docker image requires the ssl certificate used by SMT:\n\n```\nFROM suse/sles11sp3:latest\n\n# Import the crt file of our private SMT server\nADD http://smt.test.lan/smt.crt /etc/ssl/certs/smt.pem\nRUN c_rehash /etc/ssl/certs\n\nRUN zypper ref -s\nRUN zypper -n in vim\n```\n\n# Additional documentation\n\nFor more information visit the\n[SUSE's Docker documentation](https://www.suse.com/documentation/sles-12/book_sles_docker/data/book_sles_docker.html)\npage.\n\n# License\n\nsle2docker is released under the MIT license.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuse%2Fsle2docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuse%2Fsle2docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuse%2Fsle2docker/lists"}