make fpm the command, not the entrypoint, to make it easier to use from CI tools

This commit is contained in:
Chris R 2017-10-25 12:40:45 +01:00
parent ecb9c7447e
commit 9971f2a29d
13 changed files with 17 additions and 65 deletions

View file

@ -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 ..
```

View file

@ -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

View file

@ -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

View file

@ -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

6
debian/7/Dockerfile vendored
View file

@ -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

6
debian/8/Dockerfile vendored
View file

@ -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

View file

@ -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"]
CMD /usr/local/bin/fpm

View file

@ -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"]
CMD /usr/local/bin/fpm

View file

@ -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"]
CMD /usr/local/bin/fpm

View file

@ -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"]
CMD /usr/local/bin/fpm

View file

@ -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"]
CMD /usr/local/bin/fpm

View file

@ -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

View file

@ -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