From ff83006721d742f208ee7f6925b521757e2e73ac Mon Sep 17 00:00:00 2001 From: stdevYuniers Date: Sat, 19 Jan 2019 21:12:44 -0500 Subject: [PATCH 1/7] [docker] refs #82 Create virtualenv with 'pyskycoin' pre-installed - Update python versions - Add '--no-tty' and '-q' options to gpg to avoid future problems - Add '-q' option to wget to get less output data - Update README file --- docker/images/dev-cli/Dockerfile | 53 +++++++++++++++++++++----------- docker/images/dev-cli/README.md | 14 ++++----- 2 files changed, 42 insertions(+), 25 deletions(-) diff --git a/docker/images/dev-cli/Dockerfile b/docker/images/dev-cli/Dockerfile index 8caf6c53..0d0d8582 100644 --- a/docker/images/dev-cli/Dockerfile +++ b/docker/images/dev-cli/Dockerfile @@ -39,12 +39,22 @@ RUN set -ex \ wget \ python-pip \ python3-pip \ - && pip install --upgrade pip \ - && pip3 install --upgrade pip + && pip install --upgrade pip virtualenv \ + && pip3 install --upgrade pip virtualenv \ + && /bin/bash -c "source /usr/local/bin/virtualenvwrapper.sh" \ + && mkdir -p /srv/venv/pysky27 \ + && mkdir -p /srv/venv/pysky34 \ + && mkdir -p /srv/venv/pysky35 \ + && mkdir -p /srv/venv/pysky36 \ + && mkdir -p /srv/venv/pysky37 \ + && virtualenv /srv/venv/pysky27 \ + && /bin/bash -c "source /srv/venv/pysky27/bin/activate && pip install pyskycoin && deactivate" \ + && virtualenv -p python3.5 /srv/venv/pysky35 \ + && /bin/bash -c "source /srv/venv/pysky35/bin/activate && pip install pyskycoin && deactivate" # Install Python 3.7 # runtime dependencies -ENV PYTHON_VERSION 3.7.1 +ENV PYTHON_VERSION="3.7.2" RUN set -ex \ && buildDeps=" \ libexpat1-dev \ @@ -55,14 +65,14 @@ RUN set -ex \ " \ && apt-get install -y $buildDeps --no-install-recommends \ \ - && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ - && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ + && wget -qO python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -qO python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && for server in ha.pool.sks-keyservers.net \ hkp://p80.pool.sks-keyservers.net:80 \ keyserver.ubuntu.com \ hkp://keyserver.ubuntu.com:80 ;do\ - gpg --keyserver "$server" --recv-keys 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D;done \ + gpg --no-tty -q --keyserver "$server" --recv-keys 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D;done \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ @@ -93,7 +103,7 @@ RUN set -ex \ # Install Python 3.6 # runtime dependencies -ENV PYTHON_VERSION 3.6.7 +ENV PYTHON_VERSION="3.6.8" RUN set -ex \ && buildDeps=" \ libexpat1-dev \ @@ -104,14 +114,14 @@ RUN set -ex \ " \ && apt-get install -y $buildDeps --no-install-recommends \ \ - && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ - && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ + && wget -qO python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -qO python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && for server in ha.pool.sks-keyservers.net \ hkp://p80.pool.sks-keyservers.net:80 \ keyserver.ubuntu.com \ hkp://keyserver.ubuntu.com:80 ;do\ - gpg --keyserver "$server" --recv-keys 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D;done \ + gpg --no-tty -q --keyserver "$server" --recv-keys 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D;done \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ @@ -142,7 +152,7 @@ RUN set -ex \ # Install Python 3.4 # runtime dependencies -ENV PYTHON_VERSION 3.4.9 +ENV PYTHON_VERSION="3.4.9" RUN set -ex \ && buildDeps=" \ # as of Stretch, "gpg" is no longer included by default @@ -150,14 +160,14 @@ RUN set -ex \ " \ && apt-get install -y libssl1.0-dev $buildDeps --no-install-recommends \ \ - && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ - && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ + && wget -qO python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -qO python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && for server in ha.pool.sks-keyservers.net \ hkp://p80.pool.sks-keyservers.net:80 \ keyserver.ubuntu.com \ hkp://keyserver.ubuntu.com:80 ;do\ - gpg --keyserver "$server" --recv-keys 97FC712E4C024BBEA48A61ED3A5CA953F73C700D;done \ + gpg --no-tty -q --keyserver "$server" --recv-keys 97FC712E4C024BBEA48A61ED3A5CA953F73C700D;done \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ @@ -191,7 +201,7 @@ RUN set -ex \ && rm -rf /usr/src/python # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 18.1 +ENV PYTHON_PIP_VERSION="18.1" RUN set -ex; \ \ wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ @@ -225,11 +235,18 @@ RUN set -ex; \ rm -f get-pip.py # Install packages in PIP_PACKAGES +# Create python virtualenv with pyskycoin pre-installed RUN pip install --upgrade $PIP_PACKAGES \ && pip3 install --upgrade $PIP_PACKAGES \ - && python3.4 -m pip install --upgrade $PIP_PACKAGES \ - && python3.6 -m pip install --upgrade $PIP_PACKAGES \ - && python3.7 -m pip install --upgrade $PIP_PACKAGES + && python3.4 -m pip install --upgrade $PIP_PACKAGES \ + && python3.6 -m pip install --upgrade $PIP_PACKAGES \ + && python3.7 -m pip install --upgrade $PIP_PACKAGES \ + && virtualenv -p python3.4 /srv/venv/pysky34 \ + && /bin/bash -c "source /srv/venv/pysky34/bin/activate && pip install pyskycoin && deactivate" \ + && virtualenv -p python3.6 /srv/venv/pysky36 \ + && /bin/bash -c "source /srv/venv/pysky36/bin/activate && pip install pyskycoin && deactivate" \ + && virtualenv -p python3.7 /srv/venv/pysky37 \ + && /bin/bash -c "source /srv/venv/pysky37/bin/activate && pip install pyskycoin && deactivate" WORKDIR $GOPATH/src/github.com/skycoin diff --git a/docker/images/dev-cli/README.md b/docker/images/dev-cli/README.md index e856c5b9..948208fe 100644 --- a/docker/images/dev-cli/README.md +++ b/docker/images/dev-cli/README.md @@ -2,10 +2,10 @@ ## Simple Tags -- [`develop` (*docker/images/dev/Dockerfile*)](https://github.com/simelo/pyskycoin/blob/develop/docker/images/dev/Dockerfile) -- [`dind` (*docker/images/dev/Dockerfile*)](https://github.com/simelo/pyskycoin/blob/develop/docker/images/dev/Dockerfile) +- [`develop` (*docker/images/dev/Dockerfile*)](https://github.com/simelo/pyskycoin/blob/develop/docker/images/dev/Dockerfile) +- [`dind` (*docker/images/dev/Dockerfile*)](https://github.com/simelo/pyskycoin/blob/develop/docker/images/dev/Dockerfile) -# Pyskycoin CLI/DIND development image +## Pyskycoin CLI/DIND development image This image (CLI) has the necessary tools to build, test, edit, lint and version the Pyskycoin source code. It comes with some versions of Python (2.7, 3.4, 3.5 and 3.6) and with Vim editor installed, along with some plugins @@ -14,7 +14,7 @@ to ease go development and version control with git. Besides it is possible to use Docker in Docker (DIND) Pyskycoin development image, it is based on `skycoin/skycoindev-cli:dind` and provides all tools included in Pyskycoin CLI image. -# How to use this image +## How to use this image ## Initialize your development environment. @@ -56,7 +56,8 @@ $ docker run --rm \ ### Start a daemon instance ```sh -$ docker run --privileged --name some-name -d skycoin/skycoindev-python:dind +$ docker run --privileged --name some-name \ + -d skycoin/skycoindev-python:dind ``` ### Where to store data @@ -74,7 +75,7 @@ $ docker run --privileged --name some-name \ -d skycoin/skycoindev-python:dind ``` -# Build your own images +## Build your own images The build process relies on the following parameters @@ -116,4 +117,3 @@ and `master` branch on every push made after merging. The same process is triggered for all feature branches matching the pattern `/^([^_]+)_t([0-9]+)_.*docker.*/`. The tag generated for such images will be of the form `feature-{\1}-{\2}`. - From a978ace80f300d4a23429c4956b446cb3d945888 Mon Sep 17 00:00:00 2001 From: stdevYuniers Date: Sat, 19 Jan 2019 21:23:12 -0500 Subject: [PATCH 2/7] [docker] refs #82 Delete bad line in Dockerfile --- docker/images/dev-cli/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/docker/images/dev-cli/Dockerfile b/docker/images/dev-cli/Dockerfile index 0d0d8582..d14eb2fe 100644 --- a/docker/images/dev-cli/Dockerfile +++ b/docker/images/dev-cli/Dockerfile @@ -41,7 +41,6 @@ RUN set -ex \ python3-pip \ && pip install --upgrade pip virtualenv \ && pip3 install --upgrade pip virtualenv \ - && /bin/bash -c "source /usr/local/bin/virtualenvwrapper.sh" \ && mkdir -p /srv/venv/pysky27 \ && mkdir -p /srv/venv/pysky34 \ && mkdir -p /srv/venv/pysky35 \ From 760f2ae2c0f34a676f879faf6e4182856c340496 Mon Sep 17 00:00:00 2001 From: stdevYuniers Date: Sat, 19 Jan 2019 22:04:57 -0500 Subject: [PATCH 3/7] [docker] refs #82 Avoid use default python version of virtualenv --- docker/images/dev-cli/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/images/dev-cli/Dockerfile b/docker/images/dev-cli/Dockerfile index d14eb2fe..344d3702 100644 --- a/docker/images/dev-cli/Dockerfile +++ b/docker/images/dev-cli/Dockerfile @@ -46,7 +46,7 @@ RUN set -ex \ && mkdir -p /srv/venv/pysky35 \ && mkdir -p /srv/venv/pysky36 \ && mkdir -p /srv/venv/pysky37 \ - && virtualenv /srv/venv/pysky27 \ + && virtualenv -p python2.7 /srv/venv/pysky27 \ && /bin/bash -c "source /srv/venv/pysky27/bin/activate && pip install pyskycoin && deactivate" \ && virtualenv -p python3.5 /srv/venv/pysky35 \ && /bin/bash -c "source /srv/venv/pysky35/bin/activate && pip install pyskycoin && deactivate" From e599d2c910b38523abb2cca78978e6972f160917 Mon Sep 17 00:00:00 2001 From: stdevYuniers Date: Sun, 20 Jan 2019 10:50:25 -0500 Subject: [PATCH 4/7] [docker] refs #103 Add build of vscode docker image - Add 'pylint' and 'flake8' to pre-installed pip packages - Add 'ms-python.python', 'njpwerner.autodocstring', 'shardulm94.trailing-spaces' and 'eamodio.gitlens' to pre-installed Visual Studio Code extensions --- docker/images/dev-cli/hooks/build | 34 +++++++++++++++++++++++++------ docker/images/dev-cli/hooks/push | 6 ++++-- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/docker/images/dev-cli/hooks/build b/docker/images/dev-cli/hooks/build index 326e811e..43cfdbfc 100644 --- a/docker/images/dev-cli/hooks/build +++ b/docker/images/dev-cli/hooks/build @@ -12,24 +12,46 @@ # IMAGE_NAME: the name and tag of the Docker repository being built. # (This variable is a combination of DOCKER_REPO:CACHE_TAG.) # PIP_PACKAGES: pip packages to install inside docker image. +# VS_EXTENSIONS: Visual Studio Code extensions to add on docker image, +# only if base image is not CLI purpose. echo "Build hook running" -pwd +cd ../../../ # Build :develop tag docker build --build-arg BDATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg SCOMMIT=$SOURCE_COMMIT \ - --build-arg PIP_PACKAGES="setuptools wheel tox tox-pyenv tox-travis pytest pytest-runner" \ + --build-arg PIP_PACKAGES="setuptools wheel tox tox-pyenv tox-travis pytest pytest-runner virtualenv pylint flake8" \ -f $DOCKERFILE_PATH \ -t "$IMAGE_NAME" . -# Build :dind tag -if [ "$CACHE_TAG" -eq "develop" ]; then - docker build --build-arg IMAGE_FROM="skycoin/skycoindev-cli:dind" \ +# Build :dind, :vscode and :vscode-dind tag +# Only build if docker tag is develop +if [ "$CACHE_TAG" == "develop" ]; then + docker build --build-arg IMAGE_FROM="skycoin/skycoindev-cli:dind" \ --build-arg BDATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg SCOMMIT=$SOURCE_COMMIT \ - --build-arg PIP_PACKAGES="setuptools wheel tox tox-pyenv tox-travis pytest pytest-runner" \ + --build-arg PIP_PACKAGES="setuptools wheel tox tox-pyenv tox-travis pytest pytest-runner virtualenv pylint flake8" \ -f $DOCKERFILE_PATH \ -t "$DOCKER_REPO:dind" . + + # Move to vscode folder to avoid file errors with vscode docker image + cd gopath/src/github.com/skycoin/skycoin/docker/images/dev-vscode/ + + docker build --build-arg IMAGE_FROM="$IMAGE_NAME" \ + --build-arg BDATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + --build-arg SCOMMIT=$SOURCE_COMMIT \ + --build-arg PIP_PACKAGES="setuptools wheel tox tox-pyenv tox-travis pytest pytest-runner virtualenv pylint flake8" \ + --build-arg VS_EXTENSIONS="ms-python.python njpwerner.autodocstring shardulm94.trailing-spaces eamodio.gitlens" \ + -f Dockerfile \ + -t "$DOCKER_REPO:vscode" . + + docker build --build-arg IMAGE_FROM="$DOCKER_REPO:dind" \ + --build-arg BDATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + --build-arg SCOMMIT=$SOURCE_COMMIT \ + --build-arg PIP_PACKAGES="setuptools wheel tox tox-pyenv tox-travis pytest pytest-runner virtualenv pylint flake8" \ + --build-arg VS_EXTENSIONS="ms-python.python njpwerner.autodocstring shardulm94.trailing-spaces eamodio.gitlens" \ + -f Dockerfile \ + -t "$DOCKER_REPO:vscode-dind" . fi diff --git a/docker/images/dev-cli/hooks/push b/docker/images/dev-cli/hooks/push index f9e243fc..3ae43b49 100644 --- a/docker/images/dev-cli/hooks/push +++ b/docker/images/dev-cli/hooks/push @@ -2,6 +2,8 @@ docker push $IMAGE_NAME -if [ "$CACHE_TAG" -eq "develop" ]; then - docker push $DOCKER_REPO:dind +if [ "$CACHE_TAG" == "develop" ]; then + docker push "$DOCKER_REPO:dind" + docker push "$DOCKER_REPO:vscode" + docker push "$DOCKER_REPO:vscode-dind" fi From b39d5ddeff4475e664711c8d692173315e22a14e Mon Sep 17 00:00:00 2001 From: stdevYuniers Date: Sun, 20 Jan 2019 11:48:26 -0500 Subject: [PATCH 5/7] [docker] refs #103 Enhance doc about how use pyskycoin docker images - Add 'VisualStudioExptTeam.vscodeintellicode' Visual Studio Code extension - Mod README.md file --- docker/images/dev-cli/README.md | 79 ++++++++++++++++++++++++++++--- docker/images/dev-cli/hooks/build | 4 +- 2 files changed, 74 insertions(+), 9 deletions(-) diff --git a/docker/images/dev-cli/README.md b/docker/images/dev-cli/README.md index 948208fe..5d9618dc 100644 --- a/docker/images/dev-cli/README.md +++ b/docker/images/dev-cli/README.md @@ -16,7 +16,7 @@ it is based on `skycoin/skycoindev-cli:dind` and provides all tools included in ## How to use this image -## Initialize your development environment. +## Initialize your development environment ```sh $ mkdir src @@ -30,6 +30,21 @@ This downloads the pyskycoin source to src/pyskycoin and changes the owner to your user. This is necessary, because all processes inside the container run as root and the files created by it are therefore owned by root. +## Pre-installed pip packages + +In order to provide a good development environment for you, some pip packages has been installed: + +- [setuptools](https://pypi.org/project/setuptools/) +- [wheel](https://pypi.org/project/wheel/) +- [tox](https://pypi.org/project/tox/) +- [tox-pyenv](https://pypi.org/project/tox-pyenv/) +- [tox-travis](https://pypi.org/project/tox-travis/) +- [pytest](https://pypi.org/project/pytest/) +- [pytest-runner](https://pypi.org/project/pytest-runner/) +- [virtualenv](https://pypi.org/project/virtualenv/) +- [pylint](https://pypi.org/project/pylint/) +- [flake8](https://pypi.org/project/flake8/) + ## Running commands inside the container You can run commands by just passing them to the image. Everything is run @@ -75,6 +90,31 @@ $ docker run --privileged --name some-name \ -d skycoin/skycoindev-python:dind ``` +### Use Visual Studio Code + +In order to use Visual Studio Code on development process, please read carefull +the [documentation of oficial Skycoin Visual Studio Code dev image](https://github.com/skycoin/skycoin/tree/develop/docker/images/dev-vscode#initialize-your-development-environment) + +#### Pre-installed extensions + +- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) +- [Python Docstring](https://marketplace.visualstudio.com/items?itemName=njpwerner.autodocstring) +- [Trailing Spaces](https://marketplace.visualstudio.com/items?itemName=shardulm94.trailing-spaces) + +#### Add extensions to Visual Studio Code + +Like Skycoin Visual Studio Code dev image, you must pass `VS_EXTENSIONS` environment variable +to the command-line with extensions you prefer. **Pass it if you use a docker image with Visual Studio Code** + +```sh +$ docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix \ + -v $PWD:/go/src/github.com/simelo/libskycoin-dotnet \ + -w $GOPATH/src/github.com/simelo/libskycoin-dotnet \ + -e DISPLAY=$DISPLAY \ + -e VS_EXTENSIONS="ms-python.python rebornix.Ruby" \ + simelotech/skycoindev-dotnet:vscode +``` + ## Build your own images The build process relies on the following parameters @@ -82,30 +122,55 @@ The build process relies on the following parameters - `SOURCE_COMMIT`: the SHA1 hash of the commit being tested. - `IMAGE_NAME`: the name and tag of the Docker repository being built. - `DOCKERFILE_PATH`: the dockerfile currently being built. +- `PIP_PACKAGES`: pip packages to install inside docker image. +- `VS_EXTENSIONS` Visual Studio Code extensions to add on docker image. In order to build image from `skycoindev-cli:develop` execute the following shell command ```sh -$ cd skycoin +$ cd pyskycoin $ SOURCE_COMMIT=$(git rev-parse HEAD) $ IMAGE_NAME=skycoin/skycoindev-python:develop -$ DOCKERFILE_PATH=docker/images/dev/Dockerfile +$ DOCKERFILE_PATH=docker/images/dev-cli/Dockerfile $ docker build --build-arg BDATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg SCOMMIT=$SOURCE_COMMIT \ + --build-arg PIP_PACKAGES="Twisted tox" \ -f $DOCKERFILE_PATH \ -t "$IMAGE_NAME" . ``` -If you prefer to use `skycoindev-cli:dind` then run: +If do you prefer to use `skycoindev-cli:dind` then run: ```sh -$ cd skycoin +$ cd pyskycoin +$ IMAGE_FROM="skycoin/skycoindev-cli:dind" $ SOURCE_COMMIT=$(git rev-parse HEAD) $ IMAGE_NAME=skycoin/skycoindev-python:dind -$ DOCKERFILE_PATH=docker/images/dev/Dockerfile -$ docker build --build-arg IMAGE_FROM="skycoin/skycoindev-cli:dind" \ +$ DOCKERFILE_PATH=docker/images/dev-cli/Dockerfile +$ docker build --build-arg IMAGE_FROM="$IMAGE_FROM" \ + --build-arg BDATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + --build-arg SCOMMIT=$SOURCE_COMMIT \ + --build-arg PIP_PACKAGES="Twisted tox" \ + -f $DOCKERFILE_PATH \ + -t "$IMAGE_NAME" . +``` + +Nevertheless, if do you like use Visual Studio Code instead of CLI, you can change `IMAGE_FROM` to build it. **When base image use Visual Studio Code, you can use `VS_EXTENSIONS` build arg** + +```sh +$ cd pyskycoin +$ git submodule update --init --recursive +$ # Move to vscode folder to avoid file errors with vscode docker image +$ cd gopath/src/github.com/skycoin/skycoin/docker/images/dev-vscode/ +$ IMAGE_FROM="skycoin/skycoindev-python:develop" +$ SOURCE_COMMIT=$(git rev-parse HEAD) +$ IMAGE_NAME=skycoin/skycoindev-python:vscode +$ DOCKERFILE_PATH=docker/images/dev-cli/Dockerfile +$ docker build --build-arg IMAGE_FROM="$IMAGE_FROM" --build-arg BDATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg SCOMMIT=$SOURCE_COMMIT \ + --build-arg PIP_PACKAGES="matplotlib tox" \ + --build-arg VS_EXTENSIONS="almenon.arepl ms-python.python" \ -f $DOCKERFILE_PATH \ -t "$IMAGE_NAME" . ``` diff --git a/docker/images/dev-cli/hooks/build b/docker/images/dev-cli/hooks/build index 43cfdbfc..e3f85d0a 100644 --- a/docker/images/dev-cli/hooks/build +++ b/docker/images/dev-cli/hooks/build @@ -43,7 +43,7 @@ if [ "$CACHE_TAG" == "develop" ]; then --build-arg BDATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg SCOMMIT=$SOURCE_COMMIT \ --build-arg PIP_PACKAGES="setuptools wheel tox tox-pyenv tox-travis pytest pytest-runner virtualenv pylint flake8" \ - --build-arg VS_EXTENSIONS="ms-python.python njpwerner.autodocstring shardulm94.trailing-spaces eamodio.gitlens" \ + --build-arg VS_EXTENSIONS="ms-python.python njpwerner.autodocstring shardulm94.trailing-spaces VisualStudioExptTeam.vscodeintellicode" \ -f Dockerfile \ -t "$DOCKER_REPO:vscode" . @@ -51,7 +51,7 @@ if [ "$CACHE_TAG" == "develop" ]; then --build-arg BDATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg SCOMMIT=$SOURCE_COMMIT \ --build-arg PIP_PACKAGES="setuptools wheel tox tox-pyenv tox-travis pytest pytest-runner virtualenv pylint flake8" \ - --build-arg VS_EXTENSIONS="ms-python.python njpwerner.autodocstring shardulm94.trailing-spaces eamodio.gitlens" \ + --build-arg VS_EXTENSIONS="ms-python.python njpwerner.autodocstring shardulm94.trailing-spaces VisualStudioExptTeam.vscodeintellicode" \ -f Dockerfile \ -t "$DOCKER_REPO:vscode-dind" . fi From f36ab94871fc773d0d16f04858b94c4f54504cd2 Mon Sep 17 00:00:00 2001 From: stdevYuniers Date: Sun, 20 Jan 2019 12:04:47 -0500 Subject: [PATCH 6/7] [docker] refs #103 Improve doc --- docker/images/dev-cli/README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docker/images/dev-cli/README.md b/docker/images/dev-cli/README.md index 5d9618dc..c16b4913 100644 --- a/docker/images/dev-cli/README.md +++ b/docker/images/dev-cli/README.md @@ -2,8 +2,7 @@ ## Simple Tags -- [`develop` (*docker/images/dev/Dockerfile*)](https://github.com/simelo/pyskycoin/blob/develop/docker/images/dev/Dockerfile) -- [`dind` (*docker/images/dev/Dockerfile*)](https://github.com/simelo/pyskycoin/blob/develop/docker/images/dev/Dockerfile) +- [`develop, dind, vscode, vscode-dind` (*docker/images/dev/Dockerfile*)](https://github.com/skycoin/pyskycoin/blob/develop/docker/images/dev-cli/Dockerfile) ## Pyskycoin CLI/DIND development image @@ -22,7 +21,7 @@ it is based on `skycoin/skycoindev-cli:dind` and provides all tools included in $ mkdir src $ docker run --rm \ -v ${PWD}/src:/usr/local/src skycoin/skycoindev-python:develop \ - git clone https://github.com/simelo/pyskycoin.git \ + git clone https://github.com/skycoin/pyskycoin.git \ $ sudo chown -R `whoami` src ``` @@ -86,7 +85,7 @@ The downside is that you need to make sure that the directory exists, and that e ```sh $ docker run --privileged --name some-name \ - -v /my/own/var-lib-docker:/var/lib/docker \ + -v /my/own/var-lib-docker:/var/lib/docker \ -d skycoin/skycoindev-python:dind ``` @@ -108,11 +107,11 @@ to the command-line with extensions you prefer. **Pass it if you use a docker im ```sh $ docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix \ - -v $PWD:/go/src/github.com/simelo/libskycoin-dotnet \ - -w $GOPATH/src/github.com/simelo/libskycoin-dotnet \ + -v $PWD:/go/src/github.com/skycoin/pyskycoin \ + -w $GOPATH/src/github.com/skycoin/pyskycoin \ -e DISPLAY=$DISPLAY \ -e VS_EXTENSIONS="ms-python.python rebornix.Ruby" \ - simelotech/skycoindev-dotnet:vscode + skycoindev-python:vscode ``` ## Build your own images From fe4ea3c912db6dc5dec18b37bfc9cb5131097791 Mon Sep 17 00:00:00 2001 From: stdevYuniers <34870585+stdevYuniers@users.noreply.github.com> Date: Sun, 20 Jan 2019 14:29:56 -0500 Subject: [PATCH 7/7] [docker] refs #103 Fix docker tag link --- docker/images/dev-cli/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/images/dev-cli/README.md b/docker/images/dev-cli/README.md index c16b4913..046a9077 100644 --- a/docker/images/dev-cli/README.md +++ b/docker/images/dev-cli/README.md @@ -2,7 +2,7 @@ ## Simple Tags -- [`develop, dind, vscode, vscode-dind` (*docker/images/dev/Dockerfile*)](https://github.com/skycoin/pyskycoin/blob/develop/docker/images/dev-cli/Dockerfile) +- [`develop, dind, vscode, vscode-dind` (*docker/images/dev-cli/Dockerfile*)](https://github.com/skycoin/pyskycoin/blob/develop/docker/images/dev-cli/Dockerfile) ## Pyskycoin CLI/DIND development image