Skip to content

Commit

Permalink
bashio during build
Browse files Browse the repository at this point in the history
  • Loading branch information
cvele committed May 25, 2024
1 parent b49cead commit 75848f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
9 changes: 8 additions & 1 deletion mongoDB/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ LABEL io.hass.description="A MongoDB addon for Home Assistant"
LABEL io.hass.arch="amd64|aarch64"
LABEL io.hass.type="addon"
LABEL io.hass.version="4.4.18"

RUN mkdir -p /data/db /var/log/mongodb

RUN apt-get update && \
Expand All @@ -17,6 +16,14 @@ RUN apt-get update && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN BASHIO_VERSION="0.14.3"
RUN mkdir -p /tmp/bashio
RUN curl -f -L -s -S "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | tar -xzf - --strip 1 -C /tmp/bashio
RUN mv /tmp/bashio/lib /usr/lib/bashio
RUN ln -s /usr/lib/bashio/bashio /usr/bin/bashio
RUN rm -rf /tmp/bashio


COPY run.sh /run.sh
RUN chmod +x /run.sh

Expand Down
7 changes: 0 additions & 7 deletions mongoDB/run.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
#!/bin/bash
set -e

BASHIO_VERSION="0.14.3"
mkdir -p /tmp/bashio
curl -sSL "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | tar -xzf - --strip 1 -C /tmp/bashio
mv /tmp/bashio/lib /usr/lib/bashio
ln -s /usr/lib/bashio/bashio /usr/bin/bashio
rm -rf /tmp/bashio

MONGO_INITDB_ROOT_USERNAME=$(bashio::config 'MONGO_INITDB_ROOT_USERNAME')
MONGO_INITDB_ROOT_PASSWORD=$(bashio::config 'MONGO_INITDB_ROOT_PASSWORD')
MONGO_PORT=$(bashio::config 'MONGO_PORT')
Expand Down

0 comments on commit 75848f6

Please # to comment.