-
Notifications
You must be signed in to change notification settings - Fork 450
[WIP] Add docker & .devcontainer #4319
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
base: feature/foundation
Are you sure you want to change the base?
Conversation
54c02d6
to
2a670f7
Compare
df69db4
to
8b4babb
Compare
docker/Dockerfile
Outdated
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.
Dotnet SDK has native docker publish integration. Can we use that instead?
https://learn.microsoft.com/en-us/dotnet/core/containers/sdk-publish
Also consider adding a launchProfile for docker, so it will be integrated with both VS and dotnet run
: https://learn.microsoft.com/en-us/visualstudio/containers/container-launch-settings?view=vs-2022 -- not sure if this works off of the above docker publish, or needs a docker file separately
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.
We can use that, but without a custom dockerfile we don't get a long standing container, and we wont have the components we need installed to create and run dotnet apps (likely the same for other stacks too).
Docker also does a much better job with caching so when you build the image and run it, it takes way less time the second time/or if no changes to the cli.
I'm down to use it in combination with a Dockerfile or something else to configure the image with everything you need to test and validate function apps and cli features, but as a stand alone I am not sold?
Will look into launchProfile
.
Edit:
I think maybe the intention of these approaches/images are different. I'm trying to make it so its easy to build, run and test changes you make to the CLI, where as the dotnet container publish is good for just packaging the image itself - so different use case?
Maybe a combo of the dotnet image with .devcontainers = test environment
8b4babb
to
63d952e
Compare
@@ -11,6 +11,7 @@ | |||
<PackAsTool>true</PackAsTool> | |||
<ToolCommandName>func</ToolCommandName> | |||
<PackageId>Microsoft.Azure.Functions.CoreTools</PackageId> |
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.
I'd love to move away from CoreTools and change this to Cli as well
dockerfile: docker/Dockerfile | ||
args: | ||
TARGET_RUNTIME: linux-x64 | ||
# platform: linux/amd64 # Uncomment if you are on an M1/M2 Mac |
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.
Using the apple silicone chips AND trying to run an x64 build. No need for this is running arm64
90b0462
to
bd544f8
Compare
63d952e
to
94b9065
Compare
94b9065
to
ef4d800
Compare
These are initial changes, we can make more as needed.