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
Codercord4mo ago
<#1279425864588857489>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
崩壊
崩壊OP4mo ago
No description
Phorcys
Phorcys4mo 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"
}
}
崩壊
崩壊OP4mo 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
Atif4mo ago
This does work but is not a hard limit. Docker is only limited if there is not enough memory on the host.
Phorcys
Phorcys4mo 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
崩壊
崩壊OP3mo ago
崩壊
崩壊OP3mo 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
Phorcys3mo ago
you have to use one of the following storage drivers for it to work: devicemapper, zfs, or btrfs
Phorcys
Phorcys3mo ago
Docker Documentation
Storage drivers
Learn the technologies that support storage drivers.
Phorcys
Phorcys3mo ago
hey @yourColor, any luck?
Want results from more Discord servers?
Add your server