Is there a way to set memory and storage limits?

Memory added this setting but it did not work well. Disk could not find the item itself.
No description
11 Replies
Codercord
Codercord3mo ago
<#1279425864588857489>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
houkai_3rd
houkai_3rdOP3mo ago
No description
Phorcys
Phorcys3mo ago
hello, what do you mean by "did not work well"? for the disk, you should be able to use the driver_opts parameter in the docker_volume definition see https://stackoverflow.com/a/40499023 for an explanation in this case you should be able to do something like
resource "docker_volume" "shared_volume" {
# [...]

driver_opts = {
size = "20GB"
}
}
resource "docker_volume" "shared_volume" {
# [...]

driver_opts = {
size = "20GB"
}
}
houkai_3rd
houkai_3rdOP3mo ago
Is there a way to limit memory capacity? memory = 4096 is not working
Error: volume cannot be created: Error response from daemon: create coder-b469eca5-c6b3-4a58-aaf0-aee723cf3616-home: quota size requested, quota not supported.
main.tf line 140, in resource “docker_volume” “home_volume”:
140: resource “docker_volume” “home_volume”
Error: volume cannot be created: Error response from daemon: create coder-b469eca5-c6b3-4a58-aaf0-aee723cf3616-home: quota size requested, quota not supported.
main.tf line 140, in resource “docker_volume” “home_volume”:
140: resource “docker_volume” “home_volume”
The following will be displayed
Atif
Atif3mo ago
This does work but is not a hard limit. Docker is only limited if there is not enough memory on the host.
Phorcys
Phorcys3mo ago
can you send your template over? yes, if you want stricter resource policies I would recommend that you turn to using Kubernetes instead as that lets you limit resources in a better manner
houkai_3rd
houkai_3rdOP2mo ago
Error: Unable to create volume: Error response from daemon: create coder-592d0646-e3d1-429f-a922-17760c5d3aee-home: quota size requested but no quota support
on main.tf line 140, in resource "docker_volume" "home_volume":
140: resource "docker_volume" "home_volume" {
Error: Unable to create volume: Error response from daemon: create coder-592d0646-e3d1-429f-a922-17760c5d3aee-home: quota size requested but no quota support
on main.tf line 140, in resource "docker_volume" "home_volume":
140: resource "docker_volume" "home_volume" {
Phorcys
Phorcys2mo ago
you have to use one of the following storage drivers for it to work: devicemapper, zfs, or btrfs
Phorcys
Phorcys2mo ago
Docker Documentation
Storage drivers
Learn the technologies that support storage drivers.
Phorcys
Phorcys2mo ago
hey @yourColor, any luck?
Want results from more Discord servers?
Add your server