Coder Social home page Coder Social logo

devcontainer-dfx's Introduction

Motoko/Rust Development Container

This project contains the Dockerfile for the VS Code development container.

Install

To use this you have to create a directory .devcontainer in your project and add the following two files:

.devcontainer/devcontainer.json:

{
 "name": "dfx",
 "build": {
  "dockerfile": "Dockerfile"
 },
 "mounts": [
  "source=${localWorkspaceFolder}/.config/dfx,target=/home/node/.config/dfx,type=bind"
 ],
 "settings": {
  "terminal.integrated.shell.linux": "/bin/bash"
 },
 "extensions": [
  "dbaeumer.vscode-eslint",
  "dfinity-foundation.vscode-motoko"
 ],
 // Use 'forwardPorts' to make a list of ports inside the container available locally.
 // "forwardPorts": [],
 // Use 'postCreateCommand' to run commands after the container is created.
 // "postCreateCommand": "yarn install",
 "remoteUser": "node"
}

.devcontainer/Dockerfile:

FROM f0ide/devcontainer-dfinity

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] run this to upgrade to the latest version of dfx
# RUN yes | dfx upgrade

# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

# [Optional] Uncomment if you want to install more global node modules
# RUN su node -c "npm install -g <your-package-list-here>"

# [Optional] Uncomment if you want to use Rust
# RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -t wasm32-unknown-unknown -y

Usage

Install the "Remote - Containers" extension.

Make sure Docker is installed, then run the command > Remote-Containers: Reopen in container.

This will download the docker image and setup the development container.

After that you can open a terminal and start developing in Motoko.

Development

The ./tests/ directory contains some script to test the build process. You can run all test using make inside the devcontainer.

cd tests
make test-all

devcontainer-dfx's People

Contributors

f0i avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

7flash

devcontainer-dfx's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.