Skip to content

Commit ed7051a

Browse files
authored
chore: Docker build script updates
* Removes dependency on svn externals for requirements.txt. * Removes dependency on svn for docker/build and docker/run scripts. * Removes additional Python version 3.5. * Mark docker scripts as executable. * Update docker build scripts to match CHANGELOG.md
1 parent 1156aad commit ed7051a

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

docker/Dockerfile

+1-13
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ RUN apt-get install -qy \
9292
openssh-client \
9393
patch \
9494
procps \
95-
python3.5 \
95+
python3.6 \
9696
python3-cffi \
9797
python3-dev \
9898
python3-pip \
@@ -121,18 +121,6 @@ RUN echo "root:root" | chpasswd
121121

122122
# Additional python versions.
123123

124-
# Python 3.5
125-
WORKDIR /usr/src
126-
RUN wget -q https://www.python.org/ftp/python/3.5.9/Python-3.5.9.tar.xz
127-
RUN tar xJf Python-3.5.9.tar.xz
128-
RUN rm Python-3.5.9.tar.xz
129-
WORKDIR /usr/src/Python-3.5.9/
130-
RUN ./configure
131-
RUN make
132-
RUN make altinstall
133-
WORKDIR /usr/src
134-
RUN rm -rf /usr/src/Python-3.5.9/
135-
136124
# Python 3.6
137125
WORKDIR /usr/src
138126
RUN wget -q https://www.python.org/ftp/python/3.6.10/Python-3.6.10.tar.xz

docker/build

100644100755
+5-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ shortopts=f:F:ht:vV
8181
longopts=file=,flags=,help,tag=,verbose,version
8282

8383
# Default values
84-
BRANCH=$(svn log -v ^/tags -l 1 | grep 'A /tags/cli/[1-9]' | awk '{print $2}' )
84+
BRANCH=$(grep "##" CHANGELOG.md | head -n1 | grep -oh "\[.*\]" | sed 's/[]\[]//g')
8585
TAG=${BRANCH##*/}
8686
DIR="$parent/docker"
8787
FLAVOUR=""
@@ -122,9 +122,12 @@ if [ "$(uname)" == "Linux" ]; then
122122
die "Didn't expect to run this script on Linux -- are you inside docker?"
123123
fi
124124

125-
125+
# copy requirements.txt
126+
cp $parent/requirements.txt $DIR/requirements.txt
126127
docker rmi -f ${REPO}:${FLAVOUR:-$TAG} || true
127128
docker build $FLAGS -t ${REPO}:${FLAVOUR:-$TAG} -f $FILE $DIR
129+
# remove copied requirements.txt
130+
rm $DIR/requirements.txt
128131
docker tag $(docker images -q | head -n 1) ${REPO}:${FLAVOUR:-latest}
129132
[ "$FLAVOUR" ] || docker push ${REPO}:latest
130133
docker push ${REPO}:${FLAVOUR:-$TAG}

docker/run

100644100755
+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ longopts=download-data,help,port=,docker-repo=,tag=,verbose,version,user=,
7878
# Default values
7979
FILEDIR=$parent/../data/
8080
REPO="levkowetz/xml2rfc"
81-
TAG=$(basename $(svn info $parent | grep ^URL | awk '{print $2}'))
81+
TAG=$(grep "##" CHANGELOG.md | head -n1 | grep -oh "\[.*\]" | sed 's/[]\[]//g')
8282
DBURL=https://www.ietf.org/lib/dt/sprint/ietf_utf8.bin.tar.bz2
8383
WHO=$(whoami)
8484
WHOUID=$(id -u $WHO)

0 commit comments

Comments
 (0)