mirror of
https://github.com/craigerl/aprsd.git
synced 2026-06-04 07:04:40 -04:00
Updates for building containers
This patch updates the Dockerfile for building the official container image and includes the ability to load external pypi modules as plugins at container startup.
This commit is contained in:
+12
-10
@@ -1,18 +1,16 @@
|
||||
FROM ubuntu:20.04 as aprsd
|
||||
|
||||
|
||||
ENV VERSION=1.0.0
|
||||
ENV APRS_USER=aprs
|
||||
ENV HOME=/home/aprs
|
||||
ENV APRSD=http://github.com/craigerl/aprsd.git
|
||||
ENV APRSD_BRANCH="master"
|
||||
ENV VIRTUAL_ENV=$HOME/.venv3
|
||||
|
||||
ENV INSTALL=$HOME/install
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get -y update
|
||||
RUN apt-get install -y wget gnupg git-core
|
||||
RUN apt-get install -y apt-utils pkg-config sudo
|
||||
RUN apt-get install -y python3 python3-pip python3-virtualenv
|
||||
RUN apt-get install -y apt-utils pkg-config sudo vim
|
||||
RUN apt-get install -y python3 python3-pip python3-virtualenv python3-venv
|
||||
|
||||
# Setup Timezone
|
||||
ENV TZ=US/Eastern
|
||||
@@ -24,17 +22,21 @@ RUN dpkg-reconfigure --frontend noninteractive tzdata
|
||||
RUN addgroup --gid 1000 $APRS_USER
|
||||
RUN useradd -m -u 1000 -g 1000 -p $APRS_USER $APRS_USER
|
||||
|
||||
ENV LC_ALL=C.UTF-8
|
||||
ENV LANG=C.UTF-8
|
||||
|
||||
USER $APRS_USER
|
||||
RUN pip3 install wheel
|
||||
RUN python3 -m venv $VIRTUAL_ENV
|
||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
RUN echo "export PATH=\$PATH:\$HOME/.local/bin" >> $HOME/.bashrc
|
||||
VOLUME ["/config"]
|
||||
VOLUME ["/config", "/plugins"]
|
||||
|
||||
WORKDIR $HOME
|
||||
RUN mkdir $INSTALL
|
||||
# install librtlsdr from source
|
||||
RUN git clone -b $APRSD_BRANCH $APRSD $INSTALL/aprsd
|
||||
RUN pip install aprsd
|
||||
USER root
|
||||
RUN cd $INSTALL/aprsd && pip3 install .
|
||||
RUN aprsd sample-config > /config/aprsd.yml
|
||||
RUN chown -R $APRS_USER:$APRS_USER /config
|
||||
|
||||
# override this to run another configuration
|
||||
ENV CONF default
|
||||
|
||||
Reference in New Issue
Block a user