-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
install latest azd version on containers #1766
install latest azd version on containers #1766
Conversation
Repoman Generation ResultsRepoman pushed changes to remotes for the following projects: Project: todo-csharp-cosmos-sqlRemote: azure-samples-stagingBranch: pr/1766You can initialize this project with: azd init -t Azure-Samples/todo-csharp-cosmos-sql -b pr/1766 View Changes | Compare Changes Project: todo-csharp-sql-swa-funcRemote: azure-samples-stagingBranch: pr/1766You can initialize this project with: azd init -t Azure-Samples/todo-csharp-sql-swa-func -b pr/1766 View Changes | Compare Changes Project: todo-csharp-sqlRemote: azure-samples-stagingBranch: pr/1766You can initialize this project with: azd init -t Azure-Samples/todo-csharp-sql -b pr/1766 View Changes | Compare Changes Project: todo-java-mongo-acaRemote: azure-samples-stagingBranch: pr/1766You can initialize this project with: azd init -t Azure-Samples/todo-java-mongo-aca -b pr/1766 View Changes | Compare Changes Project: todo-java-mongoRemote: azure-samples-stagingBranch: pr/1766You can initialize this project with: azd init -t Azure-Samples/todo-java-mongo -b pr/1766 View Changes | Compare Changes Project: todo-nodejs-mongo-acaRemote: azure-samples-stagingBranch: pr/1766You can initialize this project with: azd init -t Azure-Samples/todo-nodejs-mongo-aca -b pr/1766 View Changes | Compare Changes Project: todo-nodejs-mongo-aksRemote: azure-samples-stagingBranch: pr/1766You can initialize this project with: azd init -t Azure-Samples/todo-nodejs-mongo-aks -b pr/1766 View Changes | Compare Changes Project: todo-nodejs-mongo-swa-funcRemote: azure-samples-stagingBranch: pr/1766You can initialize this project with: azd init -t Azure-Samples/todo-nodejs-mongo-swa-func -b pr/1766 View Changes | Compare Changes Project: todo-nodejs-mongoRemote: azure-samples-stagingBranch: pr/1766You can initialize this project with: azd init -t Azure-Samples/todo-nodejs-mongo -b pr/1766 View Changes | Compare Changes Project: todo-nodejs-mongo-terraformRemote: azure-samples-stagingBranch: pr/1766You can initialize this project with: azd init -t Azure-Samples/todo-nodejs-mongo-terraform -b pr/1766 View Changes | Compare Changes Project: todo-python-mongo-acaRemote: azure-samples-stagingBranch: pr/1766You can initialize this project with: azd init -t Azure-Samples/todo-python-mongo-aca -b pr/1766 View Changes | Compare Changes Project: todo-python-mongo-swa-funcRemote: azure-samples-stagingBranch: pr/1766You can initialize this project with: azd init -t Azure-Samples/todo-python-mongo-swa-func -b pr/1766 View Changes | Compare Changes Project: todo-python-mongoRemote: azure-samples-stagingBranch: pr/1766You can initialize this project with: azd init -t Azure-Samples/todo-python-mongo -b pr/1766 View Changes | Compare Changes Project: todo-python-mongo-terraformRemote: azure-samples-stagingBranch: pr/1766You can initialize this project with: azd init -t Azure-Samples/todo-python-mongo-terraform -b pr/1766 View Changes | Compare Changes |
blocked by: #1764 |
@@ -3,4 +3,4 @@ FROM --platform=amd64 mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} | |||
RUN export DEBIAN_FRONTEND=noninteractive \ | |||
&& apt-get update && apt-get install -y xdg-utils \ | |||
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* | |||
RUN curl -fsSL https://aka.ms/install-azd.sh | bash | |||
RUN curl -fsSL https://aka.ms/install-azd.sh | sudo bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does adding sudo
change which version is installed? Or are you saying that a different version was installed in another CI step and this was failing previously?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I tried locally and this curl .... | bash
just fails during docker build, leaving just a previous azd version installed within the container.
I tried in WSL2. As soon as I add the sudo
there, I get latest version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vhvb1989 Do you recall what output you got from install-azd.sh
when you ran it without sudo
? I am surprised that this is required. I would have expected that the inside the container the step was running at root (note, for example, how we are able to run a bunch of apt-get
commands that should require root as well).
I don't doubt we have an issue here - but I'm trying to better understand what it was and why this ends up fixing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I tried again and of course it is working fine now.
So, my new hypothesis is that docker is just skipping the re-build of a layer that it previously build, because it has no changes. So, I built the container some time ago, before azd-release, and now, even thought there's a new release, docker is using the same pre-built layer for me, as I haven't changed the dockerfile
.
I think this is not an azd issue, or installer.
The fact that adding sudo
was working, was only because I was updating the dockerfile, forcing docker to re-compile the layer.
What we could do to help devcontiners
not to fall into this issue is to remove the azd-installation
as a docker-layer and instead support adding config to devcontainer.json
to request azd to be installed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue created: #1776
Closing as this is not the right fix. The problem is docker build cache. |
Without this change, we are installing a previous version from azd on containers, instead of the latest release.