From 9971f2a29d363292b6c214722eeda2499bcb17f1 Mon Sep 17 00:00:00 2001 From: Chris R Date: Wed, 25 Oct 2017 12:40:45 +0100 Subject: [PATCH] make fpm the command, not the entrypoint, to make it easier to use from CI tools --- README.md | 10 +++++----- centos/5/Dockerfile | 6 +----- centos/6/Dockerfile | 6 +----- centos/7/Dockerfile | 6 +----- debian/7/Dockerfile | 6 +----- debian/8/Dockerfile | 6 +----- fedora/20/Dockerfile | 6 +----- fedora/21/Dockerfile | 6 +----- fedora/22/Dockerfile | 6 +----- fedora/23/Dockerfile | 6 +----- fedora/24/Dockerfile | 6 +----- ubuntu/14.04/Dockerfile | 6 +----- ubuntu/16.04/Dockerfile | 6 +----- 13 files changed, 17 insertions(+), 65 deletions(-) diff --git a/README.md b/README.md index a619f9a..74f611e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # FPM (effing package manager) Docker Images -**cdrx/fpm-{$distro}** are a series of Docker images to quickly get packages building in fpm on different Linux distributions. +**cdrx/fpm-{$distro}** are a series of Docker images to quickly get packages building in fpm on different Linux distributions. -Each distro has fpm installed and all the required dependencies to build packages for that platform. All images are 64bit. +Each distro has fpm installed and all the required dependencies to build packages for that platform. All images are 64bit. -fpm is the entrypoint for the container, so you just need to supply your build options as commands to the container (see examples below). You should mount the files you want to put into your package into `/src/`. +You should mount the files you want to put into your package into `/src/`. If you need to do any complicated setup in the environment before running `fpm` then it would be best to write a bash script, mount it into `/src/` and override the containers entrypoint when you run it. `fpm` is available to run in the system path. @@ -35,9 +35,9 @@ The `:latest` tag will always point to the most recent release of the distro. ## Usage ``` -docker run -v "$(pwd):/src/" cdrx/fpm-ubuntu:16.04 -s dir -t deb .. +docker run -v "$(pwd):/src/" cdrx/fpm-ubuntu:16.04 fpm -s dir -t deb .. ``` ``` -docker run -v "$(pwd):/src/" cdrx/fpm-fedora:24 -s dir -t rpm .. +docker run -v "$(pwd):/src/" cdrx/fpm-fedora:24 fpm -s dir -t rpm .. ``` diff --git a/centos/5/Dockerfile b/centos/5/Dockerfile index 1adedb3..93d2bfe 100644 --- a/centos/5/Dockerfile +++ b/centos/5/Dockerfile @@ -1,9 +1,5 @@ FROM centos:5 -ENV TINI_VERSION v0.10.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini - RUN set -x \ && yum install -y ruby-devel rubygems gcc make rpmdevtools \ && gem install json -v 1.8.3 \ @@ -13,4 +9,4 @@ RUN set -x \ WORKDIR /src/ -ENTRYPOINT ["/tini", "-g", "--", "/usr/local/bin/fpm"] +CMD /usr/local/bin/fpm diff --git a/centos/6/Dockerfile b/centos/6/Dockerfile index 6772810..f96f2c5 100644 --- a/centos/6/Dockerfile +++ b/centos/6/Dockerfile @@ -1,9 +1,5 @@ FROM centos:6 -ENV TINI_VERSION v0.10.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini - RUN set -x \ && yum install -y ruby-devel rubygems gcc make rpmdevtools \ && gem install json -v 1.8.3 \ @@ -13,4 +9,4 @@ RUN set -x \ WORKDIR /src/ -ENTRYPOINT ["/tini", "-g", "--", "/usr/bin/fpm"] +CMD /usr/bin/fpm diff --git a/centos/7/Dockerfile b/centos/7/Dockerfile index e2db1ff..11be3f0 100644 --- a/centos/7/Dockerfile +++ b/centos/7/Dockerfile @@ -1,9 +1,5 @@ FROM centos:7 -ENV TINI_VERSION v0.10.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini - RUN set -x \ && yum install -y ruby-devel rubygems gcc make rpmdevtools \ && gem install fpm \ @@ -12,4 +8,4 @@ RUN set -x \ WORKDIR /src/ -ENTRYPOINT ["/tini", "-g", "--", "/usr/local/bin/fpm"] +CMD /usr/local/bin/fpm diff --git a/debian/7/Dockerfile b/debian/7/Dockerfile index 3329715..56cbc7f 100644 --- a/debian/7/Dockerfile +++ b/debian/7/Dockerfile @@ -1,9 +1,5 @@ FROM debian:7 -ENV TINI_VERSION v0.10.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini - ENV DEBIAN_FRONTEND noninteractive RUN set -x \ @@ -19,4 +15,4 @@ RUN set -x \ WORKDIR /src/ -ENTRYPOINT ["/tini", "-g", "--", "/usr/local/bin/fpm"] +CMD /usr/local/bin/fpm diff --git a/debian/8/Dockerfile b/debian/8/Dockerfile index 0f298cf..46a985c 100644 --- a/debian/8/Dockerfile +++ b/debian/8/Dockerfile @@ -1,9 +1,5 @@ FROM debian:8 -ENV TINI_VERSION v0.10.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini - ENV DEBIAN_FRONTEND noninteractive RUN set -x \ @@ -20,4 +16,4 @@ RUN set -x \ WORKDIR /src/ -ENTRYPOINT ["/tini", "-g", "--", "/usr/local/bin/fpm"] +CMD /usr/local/bin/fpm diff --git a/fedora/20/Dockerfile b/fedora/20/Dockerfile index 24d7d7a..4226147 100644 --- a/fedora/20/Dockerfile +++ b/fedora/20/Dockerfile @@ -1,9 +1,5 @@ FROM fedora:20 -ENV TINI_VERSION v0.10.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini - RUN set -x \ && yum install -y ruby-devel gcc make rpmdevtools \ && gem install fpm \ @@ -12,4 +8,4 @@ RUN set -x \ WORKDIR /src/ -ENTRYPOINT ["/tini", "-g", "--", "/usr/local/bin/fpm"] \ No newline at end of file +CMD /usr/local/bin/fpm diff --git a/fedora/21/Dockerfile b/fedora/21/Dockerfile index 91b0aeb..1913e71 100644 --- a/fedora/21/Dockerfile +++ b/fedora/21/Dockerfile @@ -1,9 +1,5 @@ FROM fedora:21 -ENV TINI_VERSION v0.10.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini - RUN set -x \ && yum install -y ruby-devel gcc make rpmdevtools \ && gem install fpm \ @@ -12,4 +8,4 @@ RUN set -x \ WORKDIR /src/ -ENTRYPOINT ["/tini", "-g", "--", "/usr/local/bin/fpm"] \ No newline at end of file +CMD /usr/local/bin/fpm diff --git a/fedora/22/Dockerfile b/fedora/22/Dockerfile index cf40515..83e8f6a 100644 --- a/fedora/22/Dockerfile +++ b/fedora/22/Dockerfile @@ -1,9 +1,5 @@ FROM fedora:22 -ENV TINI_VERSION v0.10.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini - RUN set -x \ && dnf install -y ruby-devel gcc make rpmdevtools \ && gem install fpm \ @@ -12,4 +8,4 @@ RUN set -x \ WORKDIR /src/ -ENTRYPOINT ["/tini", "-g", "--", "/usr/local/bin/fpm"] \ No newline at end of file +CMD /usr/local/bin/fpm diff --git a/fedora/23/Dockerfile b/fedora/23/Dockerfile index e287e42..965af4b 100644 --- a/fedora/23/Dockerfile +++ b/fedora/23/Dockerfile @@ -1,9 +1,5 @@ FROM fedora:23 -ENV TINI_VERSION v0.10.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini - RUN set -x \ && dnf install -y ruby-devel gcc make rpmdevtools \ && gem install fpm \ @@ -12,4 +8,4 @@ RUN set -x \ WORKDIR /src/ -ENTRYPOINT ["/tini", "-g", "--", "/usr/local/bin/fpm"] \ No newline at end of file +CMD /usr/local/bin/fpm diff --git a/fedora/24/Dockerfile b/fedora/24/Dockerfile index 8dafca3..d195ea7 100644 --- a/fedora/24/Dockerfile +++ b/fedora/24/Dockerfile @@ -1,9 +1,5 @@ FROM fedora:24 -ENV TINI_VERSION v0.10.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini - RUN set -x \ && dnf install -y ruby-devel gcc make rpmdevtools \ && gem install fpm \ @@ -12,4 +8,4 @@ RUN set -x \ WORKDIR /src/ -ENTRYPOINT ["/tini", "-g", "--", "/usr/local/bin/fpm"] \ No newline at end of file +CMD /usr/local/bin/fpm diff --git a/ubuntu/14.04/Dockerfile b/ubuntu/14.04/Dockerfile index 790c52d..9ede64f 100644 --- a/ubuntu/14.04/Dockerfile +++ b/ubuntu/14.04/Dockerfile @@ -1,9 +1,5 @@ FROM ubuntu:14.04 -ENV TINI_VERSION v0.10.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini - ENV DEBIAN_FRONTEND noninteractive RUN set -x \ @@ -19,4 +15,4 @@ RUN set -x \ WORKDIR /src/ -ENTRYPOINT ["/tini", "-g", "--", "/usr/local/bin/fpm"] +CMD /usr/local/bin/fpm diff --git a/ubuntu/16.04/Dockerfile b/ubuntu/16.04/Dockerfile index 698f8f2..0bf6b28 100644 --- a/ubuntu/16.04/Dockerfile +++ b/ubuntu/16.04/Dockerfile @@ -1,9 +1,5 @@ FROM ubuntu:16.04 -ENV TINI_VERSION v0.10.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini - ENV DEBIAN_FRONTEND noninteractive RUN set -x \ @@ -20,4 +16,4 @@ RUN set -x \ WORKDIR /src/ -ENTRYPOINT ["/tini", "-g", "--", "/usr/local/bin/fpm"] +CMD /usr/local/bin/fpm