1
0
mirror of https://github.com/craigerl/aprsd.git synced 2026-06-04 15:14:42 -04:00
Files
aprsd/Dockerfile
T

47 lines
1.1 KiB
Docker
Raw Normal View History

2020-12-11 14:23:08 -05:00
FROM ubuntu:20.04 as aprsd
ENV VERSION=1.0.0
ENV APRS_USER=aprs
ENV HOME=/home/aprs
2020-12-15 10:27:53 -05:00
ENV VIRTUAL_ENV=$HOME/.venv3
2020-12-11 14:23:08 -05:00
ENV INSTALL=$HOME/install
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
RUN apt-get install -y wget gnupg git-core
2020-12-15 10:27:53 -05:00
RUN apt-get install -y apt-utils pkg-config sudo vim
RUN apt-get install -y python3 python3-pip python3-virtualenv python3-venv
2020-12-11 14:23:08 -05:00
# Setup Timezone
ENV TZ=US/Eastern
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get install -y tzdata
RUN dpkg-reconfigure --frontend noninteractive tzdata
RUN addgroup --gid 1000 $APRS_USER
RUN useradd -m -u 1000 -g 1000 -p $APRS_USER $APRS_USER
2020-12-15 10:27:53 -05:00
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
2020-12-11 14:23:08 -05:00
USER $APRS_USER
2020-12-15 10:27:53 -05:00
RUN pip3 install wheel
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
2020-12-11 14:23:08 -05:00
RUN echo "export PATH=\$PATH:\$HOME/.local/bin" >> $HOME/.bashrc
2020-12-15 10:27:53 -05:00
VOLUME ["/config", "/plugins"]
2020-12-11 14:23:08 -05:00
WORKDIR $HOME
2020-12-15 10:27:53 -05:00
RUN pip install aprsd
2020-12-11 14:23:08 -05:00
USER root
RUN aprsd sample-config > /config/aprsd.yml
2020-12-15 10:27:53 -05:00
RUN chown -R $APRS_USER:$APRS_USER /config
2020-12-11 14:23:08 -05:00
# override this to run another configuration
ENV CONF default
USER $APRS_USER
ADD build/bin/run.sh $HOME/
ENTRYPOINT ["/home/aprs/run.sh"]