-
Notifications
You must be signed in to change notification settings - Fork 7
docker support #24
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: main
Are you sure you want to change the base?
docker support #24
Conversation
|
|
||
| resource-server: | ||
| image: aspire-resource-server:latest | ||
| ports: | ||
| - "8043:80" | ||
| volumes: | ||
| - /var/run/docker.sock:/var/run/docker.sock # This is important so that the resource server can query docker engine | ||
|
|
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.
When I created this docker-compose file, the main reason was to create a sample environment from which the resource server could inspect and collect information. I don't see how adding the resource server to the compose file would help. Would you care to shine some light on why this is helpful?
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.
The idea is to show how the resource server can be configured with docker compose as an example. User can then point their service to the docker container instance of resource server or the executable.
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.
In that case, I'd appreciate it if you could move this sample compose file into a separate samples directory, preferably with a README.md file describing what the sample directory contains and why it's there.
|
I would also suggest that you add a $ErrorActionPreference = 'Stop'
$current_date = Get-Date -Format "yyyyMMdd"
docker pull mcr.microsoft.com/dotnet/sdk:9.0
docker pull mcr.microsoft.com/dotnet/aspnet:9.0
docker buildx build --platform linux/arm64,linux/amd64 -f Dockerfile `
-t aspire-resource-server:latest `
-t aspire-resource-server:$current_date `
.. |
I don't have Windows machine to test PowerShell so will leave it to someone else. |
I can take a look at setting up this for PowerShell. |
@kiapanahi This works fine on my end. However I had to modify the compose.yaml file slightly, to point the Aspire Dashboard to the Resource service container, as well as adding the container to the Also slightly modified the Dockerfile so it works for both Powershell and Bash For the purposes I'm using the ResourceService, it would actually be great to have it published to a public image registry. Would you be open to that? And possibly we should add support for adding settings through environment variables rather than just through appsettings.json, so it would work when running as an image in container. What do you think? |
Add ability to build docker image