mirror of
https://github.com/craigerl/aprsd.git
synced 2026-06-07 00:24:41 -04:00
Updated Dockerfile's and build script for docker
This commit is contained in:
+18
-7
@@ -1,4 +1,5 @@
|
||||
FROM python:3.8-slim as aprsd
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM ubuntu:focal as aprsd
|
||||
|
||||
# Dockerfile for building a container during aprsd development.
|
||||
ARG branch
|
||||
@@ -13,11 +14,14 @@ ENV VIRTUAL_ENV=$HOME/.venv3
|
||||
ENV UID=${UID:-1000}
|
||||
ENV GID=${GID:-1000}
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
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 apt install -y --no-install-recommends git build-essential bash fortune
|
||||
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
|
||||
#RUN apt-get clean
|
||||
RUN apt-get -o Dpkg::Options::="--force-confmiss" install --reinstall netbase
|
||||
|
||||
RUN addgroup --gid 1001 $APRS_USER
|
||||
RUN useradd -m -u $UID -g $APRS_USER $APRS_USER
|
||||
@@ -25,17 +29,21 @@ RUN useradd -m -u $UID -g $APRS_USER $APRS_USER
|
||||
ENV LC_ALL=C.UTF-8
|
||||
ENV LANG=C.UTF-8
|
||||
|
||||
WORKDIR $HOME
|
||||
USER $APRS_USER
|
||||
RUN pip3 install wheel
|
||||
RUN pip install wheel
|
||||
#RUN python3 -m venv $VIRTUAL_ENV
|
||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
#ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
RUN echo "export PATH=\$PATH:\$HOME/.local/bin" >> $HOME/.bashrc
|
||||
RUN cat $HOME/.bashrc
|
||||
|
||||
USER root
|
||||
WORKDIR $HOME
|
||||
RUN mkdir $INSTALL
|
||||
RUN git clone -b $APRSD_BRANCH $APRSD $INSTALL/aprsd
|
||||
RUN cd $INSTALL/aprsd && pip3 install .
|
||||
RUN cd $INSTALL/aprsd && pip3 install -v .
|
||||
RUN ls -al /usr/local/bin
|
||||
RUN ls -al /usr/bin
|
||||
RUN which aprsd
|
||||
RUN mkdir -p /config
|
||||
RUN aprsd sample-config > /config/aprsd.yml
|
||||
@@ -48,3 +56,6 @@ VOLUME ["/config", "/plugins"]
|
||||
|
||||
ADD bin/run.sh $HOME/
|
||||
ENTRYPOINT ["/home/aprs/run.sh"]
|
||||
|
||||
HEALTHCHECK --interval=5m --timeout=12s --start-period=30s \
|
||||
CMD aprsd healthcheck --config /config/aprsd.yml --url http://localhost:8001/stats
|
||||
|
||||
Reference in New Issue
Block a user