mirror of
https://github.com/craigerl/aprsd.git
synced 2024-11-13 20:01:48 -05:00
Hemna
f0034fc517
This patch updates the main Dockerfile container build to use the python:3.8-slim base image and installs aprsd from pypi. This also results in a much smaller image. Also added support for multiarchitecture builds so the same Dockerfile builds for raspberry pi and linux/amd64
44 lines
1.0 KiB
Docker
44 lines
1.0 KiB
Docker
FROM python:3.8-slim as aprsd
|
|
|
|
# Dockerfile for building a container during aprsd development.
|
|
|
|
ARG UID
|
|
ARG GID
|
|
ARG TZ
|
|
ENV APRS_USER=aprs
|
|
ENV HOME=/home/aprs
|
|
ENV TZ=${TZ:-US/Eastern}
|
|
ENV UID=${UID:-1000}
|
|
ENV GID=${GID:-1000}
|
|
ENV LC_ALL=C.UTF-8
|
|
ENV LANG=C.UTF-8
|
|
|
|
#RUN apt update
|
|
#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
|
|
|
|
RUN addgroup --gid $GID $APRS_USER
|
|
RUN useradd -m -u $UID -g $APRS_USER $APRS_USER
|
|
|
|
# Install aprsd
|
|
RUN /usr/local/bin/pip3 install aprsd
|
|
|
|
# Ensure /config is there with a default config file
|
|
USER root
|
|
RUN mkdir -p /config
|
|
RUN aprsd sample-config > /config/aprsd.yml
|
|
RUN chown -R $APRS_USER:$APRS_USER /config
|
|
|
|
# override this to run another configuration
|
|
ENV CONF default
|
|
VOLUME ["/config", "/plugins"]
|
|
|
|
USER $APRS_USER
|
|
ADD bin/run.sh /usr/local/bin
|
|
ENTRYPOINT ["/usr/local/bin/run.sh"]
|