2021-11-09 08:15:16 -05:00
|
|
|
#FROM python:3-bullseye as aprsd
|
|
|
|
FROM ubuntu:focal as aprsd
|
2020-12-15 10:27:53 -05:00
|
|
|
|
|
|
|
# Dockerfile for building a container during aprsd development.
|
|
|
|
|
2021-02-16 10:05:11 -05:00
|
|
|
ARG UID
|
|
|
|
ARG GID
|
|
|
|
ARG TZ
|
2022-11-26 18:23:07 -05:00
|
|
|
ARG APRSD_VERSION=2.5.9
|
2020-12-15 10:27:53 -05:00
|
|
|
ENV APRS_USER=aprs
|
|
|
|
ENV HOME=/home/aprs
|
2021-02-16 10:05:11 -05:00
|
|
|
ENV TZ=${TZ:-US/Eastern}
|
|
|
|
ENV UID=${UID:-1000}
|
|
|
|
ENV GID=${GID:-1000}
|
2020-12-15 10:27:53 -05:00
|
|
|
ENV LC_ALL=C.UTF-8
|
|
|
|
ENV LANG=C.UTF-8
|
2022-11-26 18:23:07 -05:00
|
|
|
ENV APRSD_PIP_VERSION=${APRSD_VERSION}
|
|
|
|
|
2020-12-15 10:27:53 -05:00
|
|
|
|
2021-11-09 08:15:16 -05:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
2021-02-18 16:15:49 -05:00
|
|
|
RUN apt update
|
2022-11-04 11:34:27 -04:00
|
|
|
RUN apt install -y git build-essential rustc cargo
|
2021-11-09 08:15:16 -05:00
|
|
|
RUN apt install -y libffi-dev python3-dev libssl-dev libxml2-dev libxslt-dev
|
|
|
|
RUN apt install -y python3 python3-pip python3-dev python3-lxml
|
2020-12-15 10:27:53 -05:00
|
|
|
|
2021-02-16 10:05:11 -05:00
|
|
|
RUN addgroup --gid $GID $APRS_USER
|
|
|
|
RUN useradd -m -u $UID -g $APRS_USER $APRS_USER
|
|
|
|
|
|
|
|
# Install aprsd
|
2022-11-26 18:23:07 -05:00
|
|
|
RUN pip install aprsd==$APRSD_PIP_VERSION
|
2021-02-16 10:05:11 -05:00
|
|
|
|
|
|
|
# Ensure /config is there with a default config file
|
2020-12-15 10:27:53 -05:00
|
|
|
USER root
|
2021-02-13 10:41:43 -05:00
|
|
|
RUN mkdir -p /config
|
2020-12-15 10:27:53 -05:00
|
|
|
RUN aprsd sample-config > /config/aprsd.yml
|
|
|
|
RUN chown -R $APRS_USER:$APRS_USER /config
|
|
|
|
|
|
|
|
# override this to run another configuration
|
|
|
|
ENV CONF default
|
2021-02-16 10:05:11 -05:00
|
|
|
VOLUME ["/config", "/plugins"]
|
2020-12-15 10:27:53 -05:00
|
|
|
|
2021-02-16 10:05:11 -05:00
|
|
|
USER $APRS_USER
|
|
|
|
ADD bin/run.sh /usr/local/bin
|
|
|
|
ENTRYPOINT ["/usr/local/bin/run.sh"]
|
2021-11-09 08:15:16 -05:00
|
|
|
|
|
|
|
HEALTHCHECK --interval=5m --timeout=12s --start-period=30s \
|
|
|
|
CMD aprsd healthcheck --config /config/aprsd.yml --url http://localhost:8001/stats
|