mirror of
https://github.com/craigerl/aprsd.git
synced 2026-06-01 13:45:06 -04:00
Added Dockerfile-dev and updated build.sh
Build.sh is used for multi-architecture building of docker images.
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
FROM python:3.8-slim as aprsd
|
||||
|
||||
# Dockerfile for building a container during aprsd development.
|
||||
ARG BRANCH
|
||||
ARG UID
|
||||
ARG GID
|
||||
|
||||
ENV APRS_USER=aprs
|
||||
ENV HOME=/home/aprs
|
||||
ENV APRSD=http://github.com/craigerl/aprsd.git
|
||||
ENV APRSD_BRANCH=${BRANCH:-master}
|
||||
ENV VIRTUAL_ENV=$HOME/.venv3
|
||||
ENV UID=${UID:-1000}
|
||||
ENV GID=${GID:-1000}
|
||||
|
||||
ENV INSTALL=$HOME/install
|
||||
RUN apt update
|
||||
RUN apt install -y git build-essential
|
||||
RUN apt install -y libffi-dev python3-dev libssl-dev
|
||||
RUN apt install -y bash fortune
|
||||
|
||||
RUN addgroup --gid 1001 $APRS_USER
|
||||
RUN useradd -m -u $UID -g $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", "/plugins"]
|
||||
|
||||
WORKDIR $HOME
|
||||
RUN mkdir $INSTALL
|
||||
RUN git clone -b $APRSD_BRANCH $APRSD $INSTALL/aprsd
|
||||
RUN cd $INSTALL/aprsd && pip3 install .
|
||||
RUN which aprsd
|
||||
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
|
||||
USER $APRS_USER
|
||||
|
||||
ADD bin/run.sh $HOME/
|
||||
ENTRYPOINT ["/home/aprs/run.sh"]
|
||||
Reference in New Issue
Block a user