Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 4c3fc4e

Browse files
authored
Merge pull request #72 from cmendible/master
Added azure-blockchain dev container
2 parents 535a6c0 + 4819e6e commit 4c3fc4e

File tree

4 files changed

+107
-0
lines changed

4 files changed

+107
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#-------------------------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
4+
#-------------------------------------------------------------------------------------------------------------
5+
6+
FROM python:2.7
7+
8+
# Configure apt
9+
ENV DEBIAN_FRONTEND=noninteractive
10+
RUN apt-get update \
11+
&& apt-get -y install --no-install-recommends apt-utils 2>&1
12+
13+
# Install git, process tools
14+
RUN apt-get -y install git procps
15+
16+
# Install nodejs
17+
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
18+
&& apt-get install -y nodejs
19+
20+
# Install Truffle Suite
21+
RUN npm i --unsafe-perm -g truffle
22+
23+
# Install Ganache CLI
24+
RUN npm install -g ganache-cli
25+
26+
# Install the Azure CLI
27+
RUN apt-get install -y apt-transport-https curl gnupg2 lsb-release \
28+
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
29+
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 2>/dev/null \
30+
&& apt-get update \
31+
&& apt-get install -y azure-cli
32+
33+
# Clean up
34+
RUN apt-get autoremove -y \
35+
&& apt-get clean -y \
36+
&& rm -rf /var/lib/apt/lists/*
37+
ENV DEBIAN_FRONTEND=dialog
38+
39+
# Set the default shell to bash instead of sh
40+
ENV SHELL /bin/bash
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "Azure Blockchain",
3+
"dockerFile": "Dockerfile",
4+
// Uncomment the next line if you will use a ptrace-based debugger like C++, Go, and Rust.
5+
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
6+
// Uncomment the next line if you want to publish any ports.
7+
// "appPort": [],
8+
// Uncomment the next line if you want to add in default container specific settings.json values
9+
// "settings": { "workbench.colorTheme": "Quiet Light" },
10+
// Uncomment the next line to run commands after the container is created.
11+
// "postCreateCommand": "az --version",
12+
"extensions": [
13+
"ms-vscode.azurecli",
14+
"azblockchain.azure-blockchain"
15+
]
16+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
README.md
2+
test-project
3+
.vscode
4+
.npmignore
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Azure Blockchain
2+
3+
## Summary
4+
5+
*Develop with the Azure Blockchain Development Kit for Ethereum. Includes Node.js (latest LTS), git, Truffle Suite, Ganache CLI, the Azure CLI, Python 2.7.15, and related extensions and dependencies.*
6+
7+
| Metadata | Value |
8+
|----------|-------|
9+
| *Contributors* | The VS Code Team |
10+
| *Definition type* | Dockerfile |
11+
| *Languages, platforms* | Any |
12+
13+
## Using this definition with an existing folder
14+
15+
This definition requires an Azure subscription to use. You can create a [free account here](https://azure.microsoft.com/en-us/free/). Once you have an Azure account, follow these steps:
16+
17+
1. If this is your first time using a development container, please follow the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started) to set up your machine.
18+
19+
2. To use VS Code's copy of this definition:
20+
1. Start VS Code and open your project folder.
21+
2. Press <kbd>F1</kbd> select and **Remote-Containers: Create Container Configuration File...** from the command palette.
22+
3. Select the Azure Blockchain definition.
23+
24+
3. To use latest-and-greatest copy of this definition from the repository:
25+
1. Clone this repository.
26+
2. Copy the contents of `containers/azure-blockchain/.devcontainer` to the root of your project folder.
27+
3. Start VS Code and open your project folder.
28+
29+
4. After following step 2 or 3, the contents of the `.devcontainer` folder in your project can be adapted to meet your needs.
30+
31+
5. Finally, press <kbd>F1</kbd> and run **Remote-Containers: Reopen Folder in Container** to start using the definition.
32+
33+
## Testing the definition
34+
35+
This definition includes some test code that will help you verify it is working as expected on your system. Follow these steps:
36+
37+
1. If this is your first time using a development container, please follow the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started) to set up your machine.
38+
2. Clone this repository.
39+
3. Start VS Code, press <kbd>F1</kbd>, and select **Remote-Containers: Open Folder in Container...**
40+
4. Select the `containers/azure-blockchain` folder.
41+
5. After the folder has opened in the container, press <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>`</kbd> to start a new terminal.
42+
43+
## License
44+
45+
Copyright (c) Microsoft Corporation. All rights reserved.
46+
47+
Licensed under the MIT License. See [LICENSE](https://github.com/Microsoft/vscode-dev-containers/blob/master/LICENSE).

0 commit comments

Comments
 (0)