{"id":23757388,"url":"https://github.com/sedflix/dockerfile-gen","last_synced_at":"2025-08-09T06:05:59.131Z","repository":{"id":139667525,"uuid":"175047850","full_name":"sedflix/dockerfile-gen","owner":"sedflix","description":"generates random Dockerfile using char-rnn (better than yours)","archived":false,"fork":false,"pushed_at":"2019-03-14T11:32:54.000Z","size":158124,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T12:31:09.721Z","etag":null,"topics":["char-rnn","dockerfile","dockerfile-generator"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sedflix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-11T17:11:28.000Z","updated_at":"2019-11-27T04:24:38.000Z","dependencies_parsed_at":"2023-07-23T10:00:54.400Z","dependency_job_id":null,"html_url":"https://github.com/sedflix/dockerfile-gen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sedflix/dockerfile-gen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sedflix%2Fdockerfile-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sedflix%2Fdockerfile-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sedflix%2Fdockerfile-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sedflix%2Fdockerfile-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sedflix","download_url":"https://codeload.github.com/sedflix/dockerfile-gen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sedflix%2Fdockerfile-gen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269537452,"owners_count":24434166,"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-09T02:00:10.424Z","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":["char-rnn","dockerfile","dockerfile-generator"],"created_at":"2024-12-31T19:46:46.735Z","updated_at":"2025-08-09T06:05:59.123Z","avatar_url":"https://github.com/sedflix.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dockerfile Generator \nGenerates random Dockerfile using char-rnn.  \n(Yeah, it's useless. Like anyother thing done while procrastinating. All shitty things done in this repo are justified as it saved my time allowing me to actually work) \n\n## Usage\n\n### Pre-reqs\n\nDependencies:\n- pytorch\n- numpy\n- jupyter\n- docker/nvidia-docker(optional)\n\nYou are requied to clone this repo and download the data(if you want to train). Cloning this repo gonna be slow as it has a ~90MB file storing the model's weights.\n\n```\ngit clone https://github.com/sedflix/dockerfile-gen.git\ncd dockerfile-gen\nchmod +x ./get_data.sh\n./get_data.sh\n```\n\n### Using Docker\n\nBuild the image using(this is going to be even slower as the base image is not optimisied at all):\n```\nnvidia-docker build -t dockerfile-gen .\n```\n\nRun the notebook on port 8989 using:\n\n```\nnvidia-docker run -it --ipc=host -v $PWD:/app -p 8989:8989 dockerfile-gen\n```\n\n### Without Docker\n\n- install pytorch using https://pytorch.org/\n- install jupyter using your preferred method\n- start jupyter and open `dockerfile-generator.ipynb` using your preferred method\n\n## Datasets\n\nI've used the Dinosaur Datasets. It can be seen here: https://vsoch.github.io/datasets/2018/dockerfiles/\n\n```\n@misc{vanessa_sochat_2018_1287013,\n  author       = {Vanessa Sochat},\n  title        = {{vsoch/dockerfiles: Scientific Dockerfiles, Version \n                   1.0.0}},\n  month        = jun,\n  year         = 2018,\n  doi          = {10.5281/zenodo.1287013},\n  url          = {https://doi.org/10.5281/zenodo.1287013}\n}\n```\n\n## Examples\n\nYou can find more example in [EXAMPLES_E5.txt](https://github.com/sedflix/dockerfile-gen/blob/master/EXAMPLES_E5.txt). Or you can try it on your own using `rnn_best.net` provided in the repo. A few selected samples are given below:\n\n**Note**: These are examples are from the end of 5th epoch. So they are not as great at all.\n\n#### Sample 1\n```\nFROM dockerfile/nodejs  \n  \nMAINTAINER Matthew Bullstanger \u003cmatt.moner@gmail.com\u003e  \n  \n# Install python 3  \nRUN apt-get update \\  \n\u0026\u0026 apt-get install -y \\  \ngraphviz \\  \nlibssl-dev \\  \nlibssl-dev \\  \nlibxml2-dev \\  \nlibxslt-dev \\  \nlibffi-dev \\  \nlibssl-dev \\  \nlibcurl4-openssl-dev \\  \nlibpq-dev \\  \nlibxml2-dev \\  \nlibxslt1-dev \\  \npython-pip \\  \npython-dev \\  \npython-numpy \\  \npython-pip  \n  \n# Install python packages  \nRUN apt-get update \u0026\u0026 apt-get install -y --no-install-recommends \\  \nca-certificates \\  \ncurl \\  \n\u0026\u0026 apt-get clean  \n  \nRUN git clone \\--depth 1 https://github.com/creationix/nvm.git\n/usr/local/nvm \\  \n\u0026\u0026 cd /usr/local/nvm \\  \n\u0026\u0026 git checkout $VERSION \\  \n\u0026\u0026 ./configure \u0026\u0026 make install \\  \n\u0026\u0026 cd .. \u0026\u0026 rm -fr video_$VERSION_VERSION \\  \n\u0026\u0026 ln -s ../../varnish-$VERSION varnish \u0026\u0026 ln -s varnish-$VERSION /var/log  \n# Add and install php  \n# RUN curl -sS https://getcomposer.org/installer | php -- --install-\ndir=/usr/local/bin --filename=composer  \n# RUN pip install --upgrade pip  \n#RUN pip install setuptools  \n# RUN pip install --no-cache-dir -U pip setuptools  \n# RUN conda install -c conda-forge conda  \nRUN conda install --yes conda  \nRUN conda clean --tarballs  \n  \n# Copy our configuration file  \nCOPY root/. /  \n  \n# Define default command.  \nCMD [\"bash\"]  \n```\n\n#### Sample 2\n```\nFROM ubuntu  \nRUN sudo add-apt-repository -y ppa:openjdk-r/ppa \\  \n\u0026\u0026 apt-get update \\  \n\u0026\u0026 apt-get install -qqy \\  \nopenjdk-8-jdk \\  \n\u0026\u0026 apt-get autoremove -y \\  \n\u0026\u0026 apt-get clean -yqq \\  \n\u0026\u0026 apt-get autoclean -y \\  \n\u0026\u0026 apt-get autoclean \\  \n\u0026\u0026 apt-get autoremove -y \\  \n\u0026\u0026 rm -rf /var/lib/apt/lists/*  \n  \n# Add the locale archive to install and extract openshift/bin  \nRUN add-apt-repository ppa:geoserver/perforce \u0026\u0026 \\  \napt-get -y update \u0026\u0026 \\  \napt-get -yq install postgresql-client \u0026\u0026 \\  \nrm -rf /var/lib/apt/lists/* \u0026\u0026 \\  \nrm -rf /usr/share/man/?? \u0026\u0026 \\  \nrm -rf /usr/share/man/??_*  \n# Download packages  \nRUN mkdir /packer-env \u0026\u0026 \\  \ncd /packer-deploy \u0026\u0026 \\  \ngit clone https://github.com/dependencies/pop-docs/get-pip.py \u0026\u0026 \\  \ngit clone https://github.com/pyopensource/postgres.git \u0026\u0026 \\  \ncd popper \u0026\u0026 \\  \ngit checkout $GOPATH/src/github.com/docker/postgres/build/postgresql.sh  \n  \nEXPOSE 9443  \nENTRYPOINT [\"/docker-entrypoint.sh\"]  \nCMD [\"postgres\"]  \n```\n\n#### Sample 3\n```\nFROM phusion/baseimage:0.9.16  \nMAINTAINER Docker Education Team \u003ceducation@docker.com\u003e  \n  \n# Enable ENV variables  \nENV DEBIAN_FRONTEND noninteractive  \n  \nRUN apt-get update -y -qq \u0026\u0026 apt-get update \u0026\u0026 apt-get install -y wget  \n  \nRUN curl -sL https://deb.nodesource.com/setup_4.x | bash -  \nRUN apt-get install -y nodejs  \n  \n# Copy application.  \nCOPY . /app  \n  \n# Copy the current directory contents into the container at /app  \nADD . /app  \n  \n# Install app dependencies  \nRUN npm install --production  \n  \n# Copy the current directory contents into the container at /app  \nADD . /app  \n  \n# Install app dependencies  \nCOPY package.json /app/package.json  \n  \n# Install app dependencies  \nRUN npm install  \n  \n# Bundle app source  \nCOPY . /app  \n  \nEXPOSE 80  \nEXPOSE 8080  \nENV PORT 80  \nCMD npm start   \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsedflix%2Fdockerfile-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsedflix%2Fdockerfile-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsedflix%2Fdockerfile-gen/lists"}