Created
June 14, 2018 08:32
-
-
Save japsu/20594e744d3a4a0fe6e484b66cc94812 to your computer and use it in GitHub Desktop.
package a python app using virtualenv into rpm with fpm on centos 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:7 | |
WORKDIR /usr/src/app | |
RUN yum -y install epel-release && \ | |
yum -y install \ | |
automake \ | |
gcc \ | |
gcc-c++ \ | |
make \ | |
python2-devel \ | |
python2-pip \ | |
rpm-build \ | |
ruby \ | |
ruby-devel \ | |
rubygems && \ | |
yum clean all && \ | |
gem install --no-rdoc --no-ri fpm | |
RUN pip install virtualenv virtualenv-tools && rm -rf /.cache/pip | |
COPY setup.py /usr/src/app/ | |
COPY myapp /usr/src/app/myapp | |
CMD fpm --verbose --name myapp -s virtualenv -t rpm --prefix /opt/myapp . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment