Skip to content

Commit

Permalink
Added: packaging scripts for docker and FPM (centos 7).
Browse files Browse the repository at this point in the history
  • Loading branch information
strizhechenko committed Nov 28, 2017
1 parent 7e8c5b3 commit ad88f9a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packaging/centos-7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM centos:latest


MAINTAINER Oleg Strizhechenko version: 0.1

RUN yum -y install epel-release && yum -y update
RUN yum -y install ruby-devel gcc make rpm-build rubygems python-pip
RUN gem install --no-ri --no-rdoc fpm
ADD netutils.sh /root/netutils.sh
RUN pip install setuptools

CMD ["/bin/bash"]
8 changes: 8 additions & 0 deletions packaging/centos-7/netutils.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

IFS=: read _ _ distro _ release _ < /etc/system-release-cpe
if [ "$distro" != "centos" ]; then
echo "Script written to run in CentOS, not $distro"
fi

fpm -s python -t rpm -d PyYAML --python-disable-dependency pyyaml --rpm-dist "el$release" netutils-linux

0 comments on commit ad88f9a

Please sign in to comment.