From a867674859cb1f0ce90f6ee90d8e05de9b4f389e Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 28 Jun 2019 09:42:10 -0700 Subject: [PATCH] Move the dist folder to the root --- docker/scripts/do-build.sh | 16 +++++++++++----- docker/scripts/hello.sh | 6 +++++- docker/ubuntu-18.04/Dockerfile | 4 ++-- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/docker/scripts/do-build.sh b/docker/scripts/do-build.sh index 85e238e7..5cf23c2a 100755 --- a/docker/scripts/do-build.sh +++ b/docker/scripts/do-build.sh @@ -1,8 +1,14 @@ #!/bin/bash #-------------------------------------------------------------------------- -# This script is run in the Docker containers performs the actual build of -# Phoenix. It expects to find a source tarball in ../../dist, (which is -# mapped to ~/dist in the container). +# This script is run inside the Docker containers to perform the actual build +# of Phoenix. It expects to find a source tarball in a host folder (such as +# $PHOENIX_DIR/dist) which is mapped to `/dist` in the container. This can be +# accomplished by passing an arg like this to docker when running the build: +# +# docker -v $PWD/../dist:/dist ... +# +# The results of the build will be copied to a `linux` subfolder in the same +# location. #-------------------------------------------------------------------------- set -o errexit @@ -20,7 +26,7 @@ if [ "$PORT" == "" ]; then PORT=all fi -TARBALL=$(ls ~/dist/wxPython-*.tar.gz) +TARBALL=$(ls /dist/wxPython-*.tar.gz) if [ "$TARBALL" == "" ]; then echo "ERROR: Source tarball not found." exit 1 @@ -63,7 +69,7 @@ function do_build { # copy the results back to the host's shared dist folder WXPYVER=$(python -c "import buildtools; buildtools.printVersion()") - DEST=~/dist/linux/$TAG/$DIST_NAME + DEST=/dist/linux/$TAG/$DIST_NAME mkdir -p $DEST mv dist/*.whl $DEST diff --git a/docker/scripts/hello.sh b/docker/scripts/hello.sh index 9f1ed4c9..5989faac 100755 --- a/docker/scripts/hello.sh +++ b/docker/scripts/hello.sh @@ -1,2 +1,6 @@ #!/bin/bash -echo Hello World +echo "Hello World, from wxPython's build container on $DIST_NAME" +echo " User: " $(whoami) +echo " ~/bin: " $(ls ~/bin) +echo " ~/venvs:" $(ls ~/venvs) +echo " /dist: " $(ls /dist) diff --git a/docker/ubuntu-18.04/Dockerfile b/docker/ubuntu-18.04/Dockerfile index d662bb3e..9d658c3d 100644 --- a/docker/ubuntu-18.04/Dockerfile +++ b/docker/ubuntu-18.04/Dockerfile @@ -1,4 +1,3 @@ - # The base image FROM ubuntu:18.04 @@ -12,7 +11,9 @@ ENV PATH=$HOME/bin:$PATH # Update and install basic OS packages RUN \ + mkdir -p /dist; \ adduser --disabled-password --gecos "" ${USER}; \ + echo "${USER} ALL=(ALL) NOPASSWD:ALL\n" >> /etc/sudoers; \ apt-get update; \ apt-get upgrade -y; \ apt-get install -y \ @@ -56,7 +57,6 @@ WORKDIR ${HOME} RUN \ cd ${HOME}; \ mkdir -p ${HOME}/venvs; \ - mkdir -p ${HOME}/dist; \ virtualenv --python=python2.7 venvs/Py27; \ python3.6 -m venv venvs/Py36; \ python3.7 -m venv venvs/Py37;