Skip to content

Commit

Permalink
Update 3.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeakes committed May 30, 2024
1 parent 3229246 commit 7a27d80
Show file tree
Hide file tree
Showing 13 changed files with 228 additions and 229 deletions.
66 changes: 66 additions & 0 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#####################################
#
# Build container
# The most basic build for aqualinkd latest version
#####################################

FROM debian:bookworm AS aqualinkd-build

#ARG AQUALINKD_VERSION=2.3.3
ARG AQUALINKD_VERSION
ARG AQUALINKD_SOURCE

RUN test -n "$AQUALINKD_VERSION" || (echo "AQUALINKD_VERSION not set" && false)
RUN test -n "$AQUALINKD_SOURCE" || (echo "AQUALINKD_SOURCE not set" && false)

#VOLUME ["/aqualinkd-build"]

RUN apt-get update && \
apt-get -y install build-essential libsystemd-dev

# Seup working dir
RUN mkdir /home/AqualinkD
WORKDIR /home/AqualinkD

# Get latest release
RUN curl -sL $(curl -s https://api.github.com/repos/sfeakes/AqualinkD/releases/latest | grep "tarball_url" | cut -d'"' -f4) | tar xz --strip-components=1

# Build aqualinkd
RUN make clean && \
make container

#####################################
#
# Runtime container
#
#####################################

FROM debian:bookworm-slim AS aqualinkd

#ARG AQUALINKD_VERSION

RUN apt-get update && \
apt-get install -y cron curl && \
apt-get clean

# Set cron to read local.d
RUN sed -i '/EXTRA_OPTS=.-l./s/^#//g' /etc/default/cron

# Add Open Container Initiative (OCI) annotations.
# See: https://github.com/opencontainers/image-spec/blob/main/annotations.md

LABEL org.opencontainers.image.title="AqualinkD"
LABEL org.opencontainers.image.url="https://hub.docker.com/repository/docker/sfeakes/aqualinkd/general"
LABEL org.opencontainers.image.source="https://github.com/sfeakes/AqualinkD"
LABEL org.opencontainers.image.documentation="https://github.com/sfeakes/AqualinkD"
#LABEL org.opencontainers.image.version=$AQUALINKD_VERSION


COPY --from=aqualinkd-build /home/AqualinkD/release/aqualinkd /usr/local/bin/aqualinkd
COPY --from=aqualinkd-build /home/AqualinkD/release/serial_logger /usr/local/bin/serial_logger
COPY --from=aqualinkd-build /home/AqualinkD/web/ /var/www/aqualinkd/
COPY --from=aqualinkd-build /home/AqualinkD/release/aqualinkd.conf /etc/aqualinkd.conf
#COPY --from=aqualinkd-build /home/AqualinkD/docker/aqualinkd-docker.cmd /usr/local/bin/aqualinkd-docker
RUN curl -s -o /usr/local/bin/aqualinkd-docker https://raw.githubusercontent.com/sfeakes/AqualinkD/master/extras/aqualinkd-docker.cmd

CMD ["sh", "-c", "/usr/local/bin/aqualinkd-docker"]
5 changes: 4 additions & 1 deletion extras/aqualinkd-docker.cmd → Docker/aqualinkd-docker.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ else
AQUA_CONF="/etc/aqualinkd.conf"
fi


# See if we have any execpre files to run.
if [[ -x "$CONFDIR/aqexec-pre.sh" ]]; then
"$CONFDIR/aqexec-pre.sh"
fi

# Start cron
service cron start
Expand Down
2 changes: 1 addition & 1 deletion release/docker-compose.yml → Docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ services:
aqualinkd:
#image: sfeakes/aqualinkd:latest
build:
context: https://github.com/sfeakes/AqualinkD-Docker.git#main
context: https://github.com/sfeakes/AqualinkD.git#main
ports:
- "6171:80"
volumes:
Expand Down
Loading

0 comments on commit 7a27d80

Please sign in to comment.