Skip to content

Commit

Permalink
Update packages before running preinstall.sh in Dockerfiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahopkins-at-zip committed Jul 8, 2019
1 parent afc1d67 commit 6c97dae
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Expand Up @@ -12,14 +12,18 @@

FROM debian:buster as builder

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get dist-upgrade -y -q --no-install-recommends

# Apt-get our dependencies, download, build, and install VIPS, and download and install Go.
ADD preinstall.sh /app/src/github.com/die-net/fotomat/
RUN DEBIAN_FRONTEND=noninteractive \
VIPS_OPTIONS="--prefix=/usr" \
RUN VIPS_OPTIONS="--prefix=/usr" \
/app/src/github.com/die-net/fotomat/preinstall.sh

# Install busybox.
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends busybox
RUN apt-get install -y -q --no-install-recommends busybox

# Add the rest of our code.
ADD . /app/src/github.com/die-net/fotomat/
Expand Down
12 changes: 7 additions & 5 deletions Dockerfile-dpkg
Expand Up @@ -7,16 +7,18 @@
ARG BASE
FROM $BASE

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get dist-upgrade -y -q --no-install-recommends && \
apt-get install -y -q --no-install-recommends fakeroot

# Apt-get our dependencies, download, build, and install VIPS, and download and install Go.
ADD preinstall.sh /app/src/github.com/die-net/fotomat/
RUN DEBIAN_FRONTEND=noninteractive \
CFLAGS="-O2 -ftree-vectorize -msse2 -ffast-math -fPIE" \
RUN CFLAGS="-O2 -ftree-vectorize -msse2 -ffast-math -fPIE" \
VIPS_OPTIONS="--disable-shared --enable-static" \
/app/src/github.com/die-net/fotomat/preinstall.sh

# Add dpkg build tool.
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends fakeroot

# Add the rest of our code.
ADD . /app/src/github.com/die-net/fotomat/

Expand Down
7 changes: 4 additions & 3 deletions Dockerfile-rpm
Expand Up @@ -7,6 +7,10 @@
ARG BASE
FROM $BASE

# Update packages and add a tool for building RPMs.
RUN yum -y update && \
yum -y install rpm-build

# Apt-get our dependencies, download, build, and install VIPS, and download and install Go.
ADD preinstall.sh /app/src/github.com/die-net/fotomat/

Expand All @@ -15,9 +19,6 @@ RUN CFLAGS="-O2 -ftree-vectorize -msse2 -ffast-math -fPIE" \
VIPS_OPTIONS="--disable-shared --enable-static" \
/app/src/github.com/die-net/fotomat/preinstall.sh

# Add a tool for building RPMs.
RUN yum -y install rpm-build

# Add the rest of our code.
ADD . /app/src/github.com/die-net/fotomat/

Expand Down

0 comments on commit 6c97dae

Please sign in to comment.