{"id":20435886,"url":"https://github.com/andyneff/dockerp","last_synced_at":"2026-06-08T10:02:47.884Z","repository":{"id":90969377,"uuid":"49455101","full_name":"andyneff/dockerp","owner":"andyneff","description":"Docker+ features","archived":false,"fork":false,"pushed_at":"2016-01-13T20:25:06.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T06:43:43.754Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andyneff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-11T21:19:25.000Z","updated_at":"2016-01-11T21:34:39.000Z","dependencies_parsed_at":"2023-03-17T21:45:43.616Z","dependency_job_id":null,"html_url":"https://github.com/andyneff/dockerp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andyneff/dockerp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyneff%2Fdockerp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyneff%2Fdockerp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyneff%2Fdockerp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyneff%2Fdockerp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andyneff","download_url":"https://codeload.github.com/andyneff/dockerp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyneff%2Fdockerp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34057158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"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":[],"created_at":"2024-11-15T08:38:17.448Z","updated_at":"2026-06-08T10:02:47.867Z","avatar_url":"https://github.com/andyneff.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README #\n\nDocker+ - Adds two simple features to a Dockerfile\n\n1. SOURCE - A Dockerfile command that can source another dockerfile into your dockerfile. \nFROM and MAINTAINER lines are stripped from sourced files. By default, if the sourced\nfile is not an absolute path, the current working directory is used. If the file\ncan not be found, the docker+ directory is used to search for plugins. Plugins\nare common featured dockerfile to do some complicated tasks automatically.\nSee [Plugins](#plugins) section. They often need environment variables or docker\noptions to run properly, so be sure to read the plugin file/section.\n2. Variable substitution - Variables following the pattern `[{VAR_NAME}]` will be\nsubstituted using environment variables of the same name. If the environment\nvariable does not exit, `[{VAR_NAME}]` will be removed. A default value can be\ndeclared using `[{VAR_NAME:DEFAULT_VALUE}]` notations. These are environment variables\nthat have to be exported when `docker build` is executed.\n\n## Requirements ##\n\nCurrently bash, perl and sed are used. It should be compatible with all docker\ncapable operating systems including: Linux, OSX, and Windows running MINGW32 \n(and MINGW64, even though that is not supported yet by boot2docker)\n\n## Usage ##\n\n    cat Dockerfile.config | docker+.bsh \u003e Dockerfile\n\nor\n\n    docker+.bsh Dockerfile.config \u003e Dockerfile\n\n## Justification ##\n\nDoesn't this break the entire dockerhub pattern and repeatability? Well, YES!\n\nBut in the end, variables substitution is necessary for more complicated situations.\nFor example, a docker that matches the UID of the running user. Instead of hard\ncoding it in a docker files, a simple Makefile or script can be written to call\ndocker+ and create a Dockerfile at build time.\n\n    build:\n      env USER_UID=`id -u` USER_GID=`id -g` docker build -t my_image_name .\n\nCode diversion is another issue I have with the current tag system for dockerhub.\nI may have many Dockerfiles where ONLY one line would change... instead of switching\ntags and updating them all, I just one ONE main dockerfile, and use docker+ to\ncreate the multiple versions of the Dockerfile\n[Example](https://github.com/andyneff/git-lfs_dockers/blob/52ef18235d54b60a9d4ad233a69a5c12b0107232/commit_tags.bsh)\n\n## Plugins ##\n\n### nvidia.plugin ###\n\nPurpose: Installs the nvidia driver in the docker (with no kernel module)\n\nJustification: This is needed to do any GPU work in the docker, but the version\nof the driver in the docker must match EXACTLY the version of the host. Thanks\n\n\nVariables: The docker environment variable `NVIDIA_VERSION` **must** be set before\n`SOURCE nvidia.plugin`\n\nIssues: Certain versions of the nvidia driver are not available for download. They\nwere distributed via cuda repo only. This includes all nvidia drivers install via\na repo before 352.55. To install these, look at one of the other nvidia-*.plugins\n\nDoes not work in boot2docker (unless you find someway of adding a GPU device to\nthe host os, which I don't even know if it is possible for TCL. Plus you would\nhave to have a quadro or electronically modified GTX card to get GPU passthrough\nenabled... So IF you used a custom OS and quadro or modified tx card, I suppose \nit MIGHT be possible to pass a GPU device from the virtual machine to the \ndocker... I have and never will test this. Good luck!)\n\n### cuda.plugin ###\n\nPurpose: Installs the cuda SDK\n\nJustification: This is needed to do OpenCL and cuda processing in the docker\n\nVariables: The docker environment variable `CUDA_VERSION` **must** be set before\n`SOURCE cuda.plugin`\n\nIssues: Every version of the Nvidia driver can support UP to a specific version\nof the CUDA SDK. Attempting a version after that will result in a \"CUDA Driver version\"\nmismatch with the \"CUDA Runtime Version\". \n\nThe version of CUDA the video card is the \"CUDA Driver Version\", while the version\nof CUDA being compiled and run against is the \"CUDA Runtime Version\". The version \nof CUDA the video card driver can support can be checked with the deviceQuery \nfrom the CUDA SDK Sampled (yeah, chicken before the egg problem). Usually, an \nolder version of CUDA can be used, but there are exceptions. For example, 346.46 \ndoes not work well with cuda 5.5.\n\nCurrently only versions 7.5 to 5.5 are configured to work.\n\n### cuda-sample.plugin ###\n\nPurpose: Same as `cuda.plugin`, except the samples are installed.\n\n\n### cuda-env.plugin ###\n\nPurpose: Setup paths for cuda\n\nJustification: In order to use cuda easily, the ld path and path need to be \nmodified for cuda\n\nVariables: Uses `CUDA_VERSION` like `cuda.plugin`\n\n### user.plugin ###\n\nPurpose: Setup user in docker\n\nJustification: A user account (often matching the running user's UID/GID) is\nnecessary for some docker tasks. For example, to access the X server, you must\npass /tmp/.X11-unix to the docker AND have the same UID/GID, thanks to \n[link](http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/). This\nis also important when modifying files and you want the uid/gid to match\n\nVariables: The docker environment variables USER_NAME, USER_UID, and USER_GID\n**may** be defined before `SOURCE user.plugin`. If they are not set, the defaults\n`dev 1000:50` are used, which matches boot2docker's uid/gid.\n\nIssues: Only supports one user and one gid. For more complicated situations, \ndon't use this plugin. \n\n### user_pre.plugin and user_post.plugin ###\n\nPurpose: Same as `user.plugin`, but split into two different steps\n\nJustification: The caching feature in docker is extremely useful, especially for\nimages that take a considerable amount of time to `build`. Since there is a\npossibility the uid/gid may change a lot in your image, the \n`SOURCE user_pre.plugin` can be used at the beginning of the Dockerfile to create\nthe dev user, and additional Dockerfile commands can use the dev user account. At \nthe end, the environment variables can be set followed by `SOURCE user_post.plugin`\nto change the user to your desired UID and GID (and username if you want). The\nhome directory is recursively `chown`ed, but nothing else.\n\nIssues: Any files outside of `~dev` owned by dev will need to be `chown`ed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyneff%2Fdockerp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandyneff%2Fdockerp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyneff%2Fdockerp/lists"}