I used to understand how to run Internet Identity locally and I had it working with my projects, but I just pulled the latest source and now it seems that I’m supposed to run it in docker instead of just deploying a canister. I downloaded the Docker mac app, started it, then ran the command from the internet_identity github page:
II_FETCH_ROOT_KEY=1 dfx build; II_DUMMY_CAPTCHA=1 II_DUMMY_AUTH=1 ./scripts/docker-build
Note that I had to run dfx canister create internet_identity
first or the dfx build
command would not succeed and, presumably, the following command wouldn’t either.
I then browse to the following URL, which I expect to show the II login page (the cid is from internet_identity/.dfx/local/canister_ids.json and 0.0.0.0:8000 is what dfx start
printed out)
http://0.0.0.0:8000/?canisterId=rrkah-fqaaa-aaaaa-aaaaq-cai
I receive the following error on that page:
Replica Error (3): "IC0304: Attempt to execute a message on canister rrkah-fqaaa-aaaaa-aaaaq-cai which contains no Wasm module"
This all made sense before Docker was involved, since I just did the below dfx deploy
command as instructed on the github page (which has now been changed to the above docker script) and the internet_identity canister worked just like any other canister running locally:
II_FETCH_ROOT_KEY=1 dfx deploy --no-wallet --argument '(null)'
But now I guess the canister is maybe running somewhere other than my dfx start
instance? I’m not sure why it can’t be found at the cid specified in .dfx/canister_ids.json like any of my other canisters. Maybe I just don’t understand how I’m supposed to interact with containers running inside Docker? Or is Docker just used for building the wasm and I’m somehow supposed to get it to run in dfx with another command?
The last thing the docker script prints out is COPY --from=build /internet_identity.wasm
which now exists at the root of the internet_identity project. Am I supposed to do something more to get the wasm to run in my local dfx instance? I found this forum post from last year, but it’s not very helpful.
Further, the using-dev-build demo at internet-identity/demos/using-dev-build at main · dfinity/internet-identity · GitHub makes no mention of Docker and seems to want me to deploy internet_identity the old way, which works. Kind of. Instead of navigating to 0.0.0.0:8000/?canisterId=rrkah-fqaaa-aaaaa-aaaaq-cai as is printed out after deploy (which gives me an ERR_SSL_PROTOCOL_ERROR in the console and loads a blank page) or to localhost:8000/?canisterId=rrkah-fqaaa-aaaaa-aaaaq-cai (which loads a page asking me to provide a canister ID or specify a did file, as though I’m trying to load the autogenerated candid frontend, even though the cid in the url is the one from canister_ids.json for internet_identity, not __Candid_UI), I am able to load the Internet Identity login page by navigating to http://rrkah-fqaaa-aaaaa-aaaaq-cai.localhost:8000/
Sorry for the wall of text, but I’d like to take advantage of the new Docker stuff and want to be running Internet Identity as recommended, but could use some help understand how it’s supposed to work. How am I supposed to get the built wasm file, or the downloaded pre-built wasm modules from the github page to run locally?