Skip to content

Commit

Permalink
Switch to Debian-slim base images
Browse files Browse the repository at this point in the history
Signed-off-by: Johann Hoffmann <[email protected]>
  • Loading branch information
oblom0v committed Aug 17, 2022
1 parent 055ea2e commit c36d4bc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -e

if [ "$SELFSIGNED_CERTS" = 'true' ]; then
Expand Down Expand Up @@ -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 "$@"
4 changes: 2 additions & 2 deletions wait-for-postgres.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# wait-for-postgres.sh

set -e
Expand All @@ -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 "$@"

0 comments on commit c36d4bc

Please sign in to comment.