Skip to content

Commit

Permalink
base bump
Browse files Browse the repository at this point in the history
  • Loading branch information
OttPeterR committed May 7, 2023
1 parent c113f7f commit 2f44096
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 32 deletions.
75 changes: 48 additions & 27 deletions babybuddy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.17

ARG BUILD_FROM=ghcr.io/hassio-addons/base:13.2.2
# hadolint ignore=DL3006
ARG BABYBUDDY_VERSION=1.16.0
FROM ${BUILD_FROM}

# set version label
ARG BUILD_DATE
ARG VERSION
ARG BABYBUDDY_VERSION=1.16.0
LABEL build_version="Build-date:- ${BUILD_DATE}"
VOLUME ["/run"]

ENV S6_STAGE2_HOOK="/init-hook"
# Set shell
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# hadolint ignore=DL3003
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
build-base \
curl \
jpeg-dev \
libffi-dev \
libxml2-dev \
libxslt-dev \
postgresql-dev \
python3-dev \
zlib-dev

# hadolint ignore=DL3003
RUN \
echo "**** install runtime packages ****" && \
apk add --no-cache \
Expand All @@ -31,37 +31,58 @@ RUN \
libxml2 \
libxslt \
py3-mysqlclient \
python3
py3-pip \
python3 \
nginx

RUN \
echo "**** install babybuddy ****" && \
if [ -z ${BABYBUDDY_VERSION+x} ]; then \
BABYBUDDY_VERSION=$(curl -sX GET "https://api.github.com/repos/babybuddy/babybuddy/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
echo "**** downloading babybuddy ****" && \
curl -o \
/tmp/babybuddy.tar.gz -L \
"https://github.com/babybuddy/babybuddy/archive/refs/tags/${BABYBUDDY_VERSION}.tar.gz" && \
mkdir -p /app/www/public && \
"https://github.com/babybuddy/babybuddy/archive/refs/tags/v1.16.0.tar.gz" && \
mkdir -p /app/babybuddy && \
tar xf \
/tmp/babybuddy.tar.gz -C \
/app/www/public --strip-components=1 && \
cd /app/www/public && \
python3 -m ensurepip && \
/app/babybuddy --strip-components=1

RUN \
echo "**** installing babybuddy ****" && \
cd /app/babybuddy && \
pip3 install -U --no-cache-dir \
pip \
wheel && \
pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ -r requirements.txt
pip && \
pip install -U --ignore-installed -r requirements.txt

RUN \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
/etc/nginx \
/opt/build \
/opt/index.html \
/opt/package.sh \
/opt/src \
/opt/static \
/opt/stylesheets \
/opt/.[!.]* \
/opt/*.md \
/opt/nodemon.json \
/opt/kustomization.yaml \
/opt/kubernetes \
/opt/docker \
/opt/docs \
/root/.cache \
/root/.config \
/root/.npmrc \
/root/.node-gyp \
/root/.npm \
/tmp/.[!.]* \
/tmp/* \
$HOME/.cache \
$HOME/.cargo
/usr/lib/node_modules \
/usr/local/share/.cache

COPY root /

# copy local files
COPY root/ /
# Build arguments
ARG BUILD_VERSION

Expand Down
10 changes: 5 additions & 5 deletions babybuddy/build.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
build_from:
aarch64: ghcr.io/hassio-addons/base:13.2.0
amd64: ghcr.io/hassio-addons/base:13.2.0
armhf: ghcr.io/hassio-addons/base:13.2.0
armv7: ghcr.io/hassio-addons/base:13.2.0
i386: ghcr.io/hassio-addons/base:13.2.0
aarch64: ghcr.io/hassio-addons/base:13.2.2
amd64: ghcr.io/hassio-addons/base:13.2.2
armhf: ghcr.io/hassio-addons/base:13.2.2
armv7: ghcr.io/hassio-addons/base:13.2.2
i386: ghcr.io/hassio-addons/base:13.2.2
2 changes: 2 additions & 0 deletions how_to_build_locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ docker run \
--all \
-t /data
```

when updating versions, make sure to bump the build.yaml as well

0 comments on commit 2f44096

Please sign in to comment.