From 24edcad60a5218dcafaf38115524dc471ad4b874 Mon Sep 17 00:00:00 2001 From: Hemna Date: Wed, 10 Feb 2021 11:58:02 -0500 Subject: [PATCH] Moved docker related stuffs to docker dir --- Dockerfile | 42 ------------------- build/build.sh | 4 -- Dockerfile-dev => docker/Dockerfile | 4 +- {build => docker}/bin/run.sh | 0 docker/build.sh | 4 ++ .../docker-compose.yml | 0 6 files changed, 6 insertions(+), 48 deletions(-) delete mode 100644 Dockerfile delete mode 100755 build/build.sh rename Dockerfile-dev => docker/Dockerfile (96%) rename {build => docker}/bin/run.sh (100%) create mode 100755 docker/build.sh rename docker-compose.yml => docker/docker-compose.yml (100%) diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 1e78d1f..0000000 --- a/Dockerfile +++ /dev/null @@ -1,42 +0,0 @@ -FROM alpine:latest as aprsd - -ENV VERSION=1.0.0 -ENV APRS_USER=aprs -ENV HOME=/home/aprs -ENV VIRTUAL_ENV=$HOME/.venv3 - -ENV INSTALL=$HOME/install -RUN apk add --update git wget py3-pip py3-virtualenv bash fortune - -# 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 adduser -h $HOME -D -u 1001 -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 pip install aprsd -USER root -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 build/bin/run.sh $HOME/ -ENTRYPOINT ["/home/aprs/run.sh"] diff --git a/build/build.sh b/build/build.sh deleted file mode 100755 index 356ccdd..0000000 --- a/build/build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -# Use this script to locally build the docker image -docker build --no-cache -t hemna6969/aprsd:latest .. diff --git a/Dockerfile-dev b/docker/Dockerfile similarity index 96% rename from Dockerfile-dev rename to docker/Dockerfile index cc968d3..51f6601 100644 --- a/Dockerfile-dev +++ b/docker/Dockerfile @@ -1,12 +1,12 @@ FROM alpine:latest as aprsd # Dockerfile for building a container during aprsd development. +ARG BRANCH -ENV VERSION=1.5.1 ENV APRS_USER=aprs ENV HOME=/home/aprs ENV APRSD=http://github.com/craigerl/aprsd.git -ENV APRSD_BRANCH="master" +ENV APRSD_BRANCH=$BRANCH ENV VIRTUAL_ENV=$HOME/.venv3 ENV INSTALL=$HOME/install diff --git a/build/bin/run.sh b/docker/bin/run.sh similarity index 100% rename from build/bin/run.sh rename to docker/bin/run.sh diff --git a/docker/build.sh b/docker/build.sh new file mode 100755 index 0000000..005a916 --- /dev/null +++ b/docker/build.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# Use this script to locally build the docker image +docker build --no-cache -t hemna6969/aprsd:latest -f ./Dockerfile . diff --git a/docker-compose.yml b/docker/docker-compose.yml similarity index 100% rename from docker-compose.yml rename to docker/docker-compose.yml