Skip to content

Commit

Permalink
Updating dockerfile and builder
Browse files Browse the repository at this point in the history
  • Loading branch information
diraol authored and Diego Rabatone Oliveira committed Apr 21, 2020
1 parent 7d00d38 commit 38ca89e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ RUN set -ex \
ENV PYTHON_MODE_HOME /root/.vim/pack/foo/start/python-mode/
ENV VIM_RC /root/.vimrc
ENV PYMODE_RC /root/.pymoderc
ENV TEST_FILE /root/test.py
ENV TEST_PATH /root/tests

COPY . ${PYTHON_MODE_HOME}
RUN set -ex \
&& cd ${PYTHON_MODE_HOME} \
&& find . -type f -name '*.pyc' -delete \
&& find . -type d -name '__pycache__' -delete \
&& ln -s ${PYTHON_MODE_HOME}tests/utils/test.py ${TEST_FILE} \
&& mkdir -p /root/tests \
&& ln -s ${PYTHON_MODE_HOME}tests/utils/test.py ${TEST_PATH} \
&& ln -s ${PYTHON_MODE_HOME}tests/utils/pymoderc ${PYMODE_RC} \
&& ln -s ${PYTHON_MODE_HOME}tests/utils/vimrc ${VIM_RC} \
&& touch /root/.vimrc.before /root/.vimrc.after
Expand Down
10 changes: 9 additions & 1 deletion build_docker_images.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#!/bin/bash
set -ex

for VER in 2.7 3.5 3.6 3.7 3.7.1
VERSIONS=$@

if [[ -z "$VERSIONS" ]]; then
VERSIONS=2.7 3.5 3.6 3.7 3.7.1
fi

for VER in $VERSIONS
do
echo "Building version $VER"
docker build -t python-mode:${VER} --build-arg PYTHON=${VER} -f Dockerfile .
done

0 comments on commit 38ca89e

Please sign in to comment.