forked from Azure/azure-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d49e21
commit 18a4cea
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#--------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
#--------------------------------------------------------------------------------------------- | ||
|
||
# Dockerfile used by VS Code Spot extension. (https://marketplace.visualstudio.com/items?itemName=derek-bekoe.Spot) | ||
# This allows Spots to be created directly from PRs. | ||
# The major difference between Dockerfile.spot and Dockerfile is the latter depends on alpine and this one does not. | ||
|
||
FROM python:3.6.4 | ||
|
||
ENV JP_VERSION="0.1.3" | ||
|
||
WORKDIR azure-cli | ||
COPY . /azure-cli | ||
|
||
# bash gcc make openssl-dev libffi-dev musl-dev - dependencies required for CLI | ||
# openssh - included for ssh-keygen | ||
# ca-certificates | ||
|
||
# curl - required for installing jp | ||
# pip wheel - required for CLI packaging | ||
# jmespath-terminal - we include jpterm as a useful tool | ||
# 1. Build packages and store in tmp dir | ||
# 2. Install the cli and the other command modules that weren't included | ||
# 3. Temporary fix - install azure-nspkg to remove import of pkg_resources in azure/__init__.py (to improve performance) | ||
RUN apt-get install -y ca-certificates curl openssl git \ | ||
&& apt-get install -y gcc make libffi-dev \ | ||
&& update-ca-certificates \ | ||
&& curl https://github.com/jmespath/jp/releases/download/${JP_VERSION}/jp-linux-amd64 -o /usr/local/bin/jp \ | ||
&& chmod +x /usr/local/bin/jp \ | ||
&& pip install --no-cache-dir --upgrade jmespath-terminal \ | ||
&& /bin/bash -c 'TMP_PKG_DIR=$(mktemp -d); \ | ||
for d in src/azure-cli src/azure-cli-core src/azure-cli-nspkg src/azure-cli-command_modules-nspkg src/command_modules/azure-cli-*/; \ | ||
do cd $d; echo $d; python setup.py bdist_wheel -d $TMP_PKG_DIR; cd -; \ | ||
done; \ | ||
[ -d privates ] && cp privates/*.whl $TMP_PKG_DIR; \ | ||
all_modules=`find $TMP_PKG_DIR -name "*.whl"`; \ | ||
pip install --no-cache-dir $all_modules; \ | ||
pip install --no-cache-dir --force-reinstall --upgrade azure-nspkg azure-mgmt-nspkg;' \ | ||
&& cat /azure-cli/az.completion > ~/.bashrc | ||
|
||
WORKDIR / | ||
|
||
CMD bash |