Autogenerate Dockerfile from ubuntu image
sudo docker run ubuntu dpkg --get-selections | awk '{print $1}' > base.list && sudo docker run pyextra dpkg --get-selections | awk '{print $1}'> pyextra.list && sort base.list pyextra.list | uniq -u > op.list && python -c "f = open('Dockerfile', 'w');f.write('from ubuntu\n');f.write('RUN apt-get update\n');for line in open('op.list').readlines():f.write('run apt-get install -y {0}'.format(line));"
Written by kracekumar
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#