Dfx deploy command

Hello :slight_smile:

I have some interrogations on the basics dfx commands : dfx canister create / dfx build / dfx install /dfx deploy.

If I understood well :

  • dfx canister create => Registers an id for your futur canisters and stores the ID in the canisters_id.jsons file.
  • dfx build => Compile your source code into a WebAssembly module ; create javascripts representation of the canister interface and put all the created files into a directory .dfx/local/canister (when you are deploying locally).
  • dfx install => Deploy the previous created folder with the WASM module and javascript files on the IC.

But what about the command dfx deploy ? Does it do the 3 previous steps in one ?

Thank you; have a good day :slightly_smiling_face: .


dfx deploy does all these steps yes, note that it runs dfx canister install --mode upgrade, which allows you to maintain canister state.

You can run dfx deploy for all canisters, or choose a canister with dfx deploy <canister-name> .


Okay thanks for the clarification!