You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to create a service with a memory limit of 2GB or higher it will fail. This is because the value must be represented in bytes and the input value is an int. max value being less that the required value
Sample program
usingPulumi;usingPulumi.Docker;classMyStack:Stack{publicMyStack(){varservice=newService("my-docker-service",newServiceArgs{Name="my-service",TaskSpec=newServiceTaskSpecArgs{ContainerSpec=newServiceTaskSpecContainerSpecArgs{Image="nginx:latest",// Replace with your desired imageResources=newServiceTaskSpecContainerSpecResourcesArgs{Limits=newServiceTaskSpecContainerSpecResourcesLimitsArgs{MemoryBytes=2*1024*1024*1024// 2GB memory limit}}}},Mode=newServiceModeArgs{Replicated=newServiceModeReplicatedArgs{Replicas=1// Number of replicas}},EndpointSpec=newServiceEndpointSpecArgs{Ports={newServiceEndpointSpecPortsArgs{Protocol="tcp",TargetPort=80,PublishedPort=8080}}}});// Export the service IDthis.ServiceId=service.Id;}[Output]publicOutput<string>ServiceId{get;set;}}classProgram{staticTask<int>Main()=>Deployment.RunAsync<MyStack>();}
Log output
rror response from daemon: rpc error: code = InvalidArgument desc = invalid memory value -2147483648: Must be at least 4MiB
Affected Resource(s)
No response
Output of pulumi about
CLI
Version 3.124.0
Go Version go1.22.5
Go Compiler gc
Plugins
KIND NAME VERSION
resource aws 6.44.0
resource command 0.11.1
resource docker 4.5.4
language dotnet unknown
Host
OS ubuntu
Version 22.04
Arch x86_64
This project is written in dotnet: executable='/usr/bin/dotnet' version='7.0.119'
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered:
Describe what happened
When trying to create a service with a memory limit of 2GB or higher it will fail. This is because the value must be represented in bytes and the input value is an int. max value being less that the required value
Sample program
Log output
rror response from daemon: rpc error: code = InvalidArgument desc = invalid memory value -2147483648: Must be at least 4MiB
Affected Resource(s)
No response
Output of
pulumi about
CLI
Version 3.124.0
Go Version go1.22.5
Go Compiler gc
Plugins
KIND NAME VERSION
resource aws 6.44.0
resource command 0.11.1
resource docker 4.5.4
language dotnet unknown
Host
OS ubuntu
Version 22.04
Arch x86_64
This project is written in dotnet: executable='/usr/bin/dotnet' version='7.0.119'
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: