Switch to Debian-slim base images

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
This commit is contained in:
Johann Hoffmann
2022-08-17 18:07:24 +02:00
parent 055ea2e3f1
commit c36d4bcad1
3 changed files with 15 additions and 15 deletions

View File

@@ -1,16 +1,16 @@
ARG ALPINE_VERSION=3.16.2
ARG DEBIAN_VERSION=11.4-slim
ARG POCO_VERSION=poco-tip-v1
ARG FMTLIB_VERSION=9.0.0
ARG CPPKAFKA_VERSION=tip-v1
ARG JSON_VALIDATOR_VERSION=2.1.0
FROM alpine:$ALPINE_VERSION AS build-base
FROM debian:$DEBIAN_VERSION AS build-base
RUN apk add --update --no-cache \
RUN apt-get update && apt-get install --no-install-recommends -y \
make cmake g++ git \
unixodbc-dev postgresql-dev mariadb-dev \
librdkafka-dev boost-dev openssl-dev \
zlib-dev nlohmann-json
unixodbc-dev libpq-dev libmariadb-dev libmariadbclient-dev-compat \
librdkafka-dev libboost-all-dev libssl-dev \
zlib1g-dev nlohmann-json3-dev
FROM build-base AS poco-build
@@ -90,21 +90,21 @@ WORKDIR /owgw/cmake-build
RUN cmake ..
RUN cmake --build . --config Release -j8
FROM alpine:$ALPINE_VERSION
FROM debian:$DEBIAN_VERSION
ENV OWGW_USER=owgw \
OWGW_ROOT=/owgw-data \
OWGW_CONFIG=/owgw-data
RUN addgroup -S "$OWGW_USER" && \
adduser -S -G "$OWGW_USER" "$OWGW_USER"
RUN useradd "$OWGW_USER"
RUN mkdir /openwifi
RUN mkdir -p "$OWGW_ROOT" "$OWGW_CONFIG" && \
chown "$OWGW_USER": "$OWGW_ROOT" "$OWGW_CONFIG"
RUN apk add --update --no-cache librdkafka su-exec gettext ca-certificates bash jq curl \
mariadb-connector-c libpq unixodbc postgresql-client
RUN apt-get update && apt-get install --no-install-recommends -y \
librdkafka++1 gosu gettext ca-certificates bash jq curl wget \
libmariadb-dev-compat libpq5 unixodbc
COPY readiness_check /readiness_check
COPY test_scripts/curl/cli /cli

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -e
if [ "$SELFSIGNED_CERTS" = 'true' ]; then
@@ -86,7 +86,7 @@ if [ "$1" = '/openwifi/owgw' -a "$(id -u)" = '0' ]; then
if [ "$RUN_CHOWN" = 'true' ]; then
chown -R "$OWGW_USER": "$OWGW_ROOT" "$OWGW_CONFIG"
fi
exec su-exec "$OWGW_USER" "$@"
exec gosu "$OWGW_USER" "$@"
fi
exec "$@"

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# wait-for-postgres.sh
set -e
@@ -20,7 +20,7 @@ if [ "$1" = '/openwifi/owgw' -a "$(id -u)" = '0' ]; then
if [ "$RUN_CHOWN" = 'true' ]; then
chown -R "$OWGW_USER": "$OWGW_ROOT" "$OWGW_CONFIG"
fi
exec su-exec "$OWGW_USER" "$@"
exec gosu "$OWGW_USER" "$@"
fi
exec "$@"