2021-02-16 10:05:11 -05:00
|
|
|
FROM python:3.8-slim 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
|
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
|
|
|
|
|
2021-02-18 16:15:49 -05:00
|
|
|
RUN apt update
|
|
|
|
RUN apt install -y git build-essential
|
|
|
|
RUN apt install -y libffi-dev python3-dev libssl-dev
|
2021-02-16 10:05:11 -05:00
|
|
|
#RUN apt-get install -y apt-utils
|
|
|
|
#RUN apt-get install -y pkg-config
|
|
|
|
#RUN apt upgrade -y
|
|
|
|
#RUN apk add --update git wget bash
|
|
|
|
#RUN apk add --update gcc linux-headers musl-dev libffi-dev libc-dev
|
|
|
|
#RUN apk add --update openssl-dev
|
|
|
|
#RUN add cmd:pip3 lsb-release
|
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
|
2021-02-18 16:15:49 -05:00
|
|
|
RUN /usr/local/bin/pip3 install aprsd==1.6.0
|
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"]
|