Public Repository

Last pushed: 2 years ago
Short Description
Base image for custom InsightSoftware docker images
Full Description

insightsoftware/base
Base Image for Insightsoftware Docker images

  • Based on alpine
  • Includes confd to configure services based on this image
  • Child images should have:
    • a subfolder confd at Dockerfile level.
    • a run.sh script that will be called bu entrypoint.sh after starting confd in the background

Dockerfile:

FROM alpine:3.3

MAINTAINER Hubble Infrastructure <hubble.infrastructure@insighsoftware.com>

ENV CONFD_VERSION=0.12.0-alpha3 \
    CONFD_SHA1=437524fe3334bd9d0424ed0ece265472e789d19e \
    ALPINE_GLIBC_BASE_URL="https://github.com/andyshinn/alpine-pkg-glibc/releases/download" \
    ALPINE_GLIBC_PACKAGE_VERSION="2.23-r1" 
ENV ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk" \
    ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-$ALPINE_GLIBC_PACKAGE_VERSION.apk" \
    ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk"

#Add Entrypoint.sh
COPY entrypoint.sh /

#Install confd and glibc
RUN set -ex && \
apk --no-cache add --virtual .build-dependencies wget ca-certificates && \
wget https://github.com/kelseyhightower/confd/releases/download/v$CONFD_VERSION/confd-$CONFD_VERSION-linux-amd64 -O /usr/local/bin/confd && \
chmod +x /usr/local/bin/confd && \
echo "$CONFD_SHA1  /usr/local/bin/confd" |  sha1sum -c - && \
wget \
  "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
  "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
  "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
  apk add --no-cache --allow-untrusted \
  "$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
  "$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
  "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
/usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 C.UTF-8 || true  && \
echo "export LANG=C.UTF-8" > /etc/profile.d/locale.sh && \
apk del glibc-i18n && \
apk del .build-dependencies && \
rm "$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" "$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
chmod +x /entrypoint.sh 

ENV LANG=C.UTF-8

#Configure confd
ONBUILD ADD ./confd /etc/confd

#Add run script
ONBUILD COPY run.sh / 
ONBUILD RUN chmod +x /run.sh

#Entrypoint
ENTRYPOINT ["/entrypoint.sh"]
Docker Pull Command
Owner
insightsoftware