Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
babadoctor

Set maximum disk size of docker instance

1 minute ago, babadoctor said:

I see, so maybe  I shouldn't use docker.

 

What would you suggest I use?

Huh... But then how does google cloud do it? They have instances that they provision...

 

Would I be better off using something like kubernetes?

 

What software would you suggest I use for something like this?

For a machine with data that you want to keep and want to be able to log into to do work, something like VirtualBox, VMWare, KVM/QEMU is the better option. Create a virtual machine, install a Linux distro and then use it like you would a physical machine. Start it, install updates and programs you need, remote into it, work on whatever you want, shut it down.

 

A docker container is based on an image. An image usually contains only the essential stuff needed to provide the one service it was made for. The image itself is immutable. When you stop and restart the container it is back to its starting point (a bit like a snapshot + rollback in a virtual machine).

 

If you need a cluster, start multiple containers based on the same image. You do not install updates inside the container because they would be lost when the container is restarted. Instead you create a new image with the new version and replace the old container.

 

Think of Kubernetes like an additional management layer on top of containers (like Docker). Kubernetes is used to orchestrate multiple containers that work together (e.g. multiple services, each in its own container that depend on one another)

 

This is where companies like Amazon, Google and Microsoft come in: They provide a platform to run such containers which are then used to provide service(s) to customers. No one signs in to these machines directly to get work done. The machines are there to provide a service.

 

(And yes, they also provide other services like hosting so you can also run virtual machines on their platform in case you need a "real" machine)

Recommended Posts

Posted · Original PosterOP

How can I set the maximum size of a docker instance?

 

For example

 

docker run -it -d -p ubuntu bash

 

runs a docker instance, but how do i set the size?


OFF TOPIC: I suggest every poll from now on to have "**CK EA" option instead of "Other"

Link to post
Share on other sites

...is there a question here? 🤔

sudo chmod -R 000 /*

What is scaling and how does it work? Asus PB287Q unboxing! Console alternatives :D Watch Netflix with Kodi on Arch Linux Sharing folders over the internet using SSH Beginner's Guide To LTT (by iamdarkyoshi)

Sauron'stm Product Scores:

Spoiler

Just a list of my personal scores for some products, in no particular order, with brief comments. I just got the idea to do them so they aren't many for now :)

Don't take these as complete reviews or final truths - they are just my personal impressions on products I may or may not have used, summed up in a couple of sentences and a rough score. All scores take into account the unit's price and time of release, heavily so, therefore don't expect absolute performance to be reflected here.

 

-Lenovo Thinkpad X220 - [8/10]

Spoiler

A durable and reliable machine that is relatively lightweight, has all the hardware it needs to never feel sluggish and has a great IPS matte screen. Downsides are mostly due to its age, most notably the screen resolution of 1366x768 and usb 2.0 ports.

 

-Apple Macbook (2015) - [Garbage -/10]

Spoiler

From my perspective, this product has no redeeming factors given its price and the competition. It is underpowered, overpriced, impractical due to its single port and is made redundant even by Apple's own iPad pro line.

 

-OnePlus X - [7/10]

Spoiler

A good phone for the price. It does everything I (and most people) need without being sluggish and has no particularly bad flaws. The lack of recent software updates and relatively barebones feature kit (most notably the lack of 5GHz wifi, biometric sensors and backlight for the capacitive buttons) prevent it from being exceptional.

 

-Microsoft Surface Book 2 - [Garbage - -/10]

Spoiler

Overpriced and rushed, offers nothing notable compared to the competition, doesn't come with an adequate charger despite the premium price. Worse than the Macbook for not even offering the small plus sides of having macOS. Buy a Razer Blade if you want high performance in a (relatively) light package.

 

-Intel Core i7 2600/k - [9/10]

Spoiler

Quite possibly Intel's best product launch ever. It had all the bleeding edge features of the time, it came with a very significant performance improvement over its predecessor and it had a soldered heatspreader, allowing for efficient cooling and great overclocking. Even the "locked" version could be overclocked through the multiplier within (quite reasonable) limits.

 

-Apple iPad Pro - [5/10]

Spoiler

A pretty good product, sunk by its price (plus the extra cost of the physical keyboard and the pencil). Buy it if you don't mind the Apple tax and are looking for a very light office machine with an excellent digitizer. Particularly good for rich students. Bad for cheap tinkerers like myself.

 

 

Link to post
Share on other sites

My first question is why?

 

you should use a volume to store the data out side of the container.


                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to post
Share on other sites
Posted · Original PosterOP
5 hours ago, vorticalbox said:

My first question is why?

 

you should use a volume to store the data out side of the container.

I wanted to create an instance that would allow my friend to ssh into my docker container and run his code/programs

 

I didn't want to allow him to have too much space, though

 

Am I going about this wrong?


OFF TOPIC: I suggest every poll from now on to have "**CK EA" option instead of "Other"

Link to post
Share on other sites
Posted · Original PosterOP
9 hours ago, vorticalbox said:

My first question is why?

 

you should use a volume to store the data out side of the container.

I don't want the container to have access to overlay, is there any way to do this?


OFF TOPIC: I suggest every poll from now on to have "**CK EA" option instead of "Other"

Link to post
Share on other sites
11 hours ago, babadoctor said:

I don't want the container to have access to overlay, is there any way to do this?

It sounds like you want a virtual machine more than a docker container. Docker containers are meant to be stateless. They run one service and all data is stored outside the container. If the container goes bad, you kill it and start a new instance. They are not meant to have things in them that is lost when the container is shut down.


Remember to quote or @mention others, so they are notified of your reply

Link to post
Share on other sites
4 hours ago, Eigenvektor said:

It sounds like you want a virtual machine more than a docker container. Docker containers are meant to be stateless. They run one service and all data is stored outside the container. If the container goes bad, you kill it and start a new instance. They are not meant to have things in them that is lost when the container is shut down.

Just to add to this, docker containera have layers, each step in your docker file is a new layer. 

 

When you start up your container it gets a new top layer were all file changes by your app goes. This layer is removed when the container is restarted, dies or is stopped. 


                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to post
Share on other sites
Posted · Original PosterOP
1 hour ago, vorticalbox said:

Just to add to this, docker containera have layers, each step in your docker file is a new layer. 

 

When you start up your container it gets a new top layer were all file changes by your app goes. This layer is removed when the container is restarted, dies or is stopped. 

I see, so maybe  I shouldn't use docker.

 

What would you suggest I use?

5 hours ago, Eigenvektor said:

It sounds like you want a virtual machine more than a docker container. Docker containers are meant to be stateless. They run one service and all data is stored outside the container. If the container goes bad, you kill it and start a new instance. They are not meant to have things in them that is lost when the container is shut down.

Huh... But then how does google cloud do it? They have instances that they provision...

 

Would I be better off using something like kubernetes?

 

What software would you suggest I use for something like this?


OFF TOPIC: I suggest every poll from now on to have "**CK EA" option instead of "Other"

Link to post
Share on other sites
Posted · Best Answer
1 minute ago, babadoctor said:

I see, so maybe  I shouldn't use docker.

 

What would you suggest I use?

Huh... But then how does google cloud do it? They have instances that they provision...

 

Would I be better off using something like kubernetes?

 

What software would you suggest I use for something like this?

For a machine with data that you want to keep and want to be able to log into to do work, something like VirtualBox, VMWare, KVM/QEMU is the better option. Create a virtual machine, install a Linux distro and then use it like you would a physical machine. Start it, install updates and programs you need, remote into it, work on whatever you want, shut it down.

 

A docker container is based on an image. An image usually contains only the essential stuff needed to provide the one service it was made for. The image itself is immutable. When you stop and restart the container it is back to its starting point (a bit like a snapshot + rollback in a virtual machine).

 

If you need a cluster, start multiple containers based on the same image. You do not install updates inside the container because they would be lost when the container is restarted. Instead you create a new image with the new version and replace the old container.

 

Think of Kubernetes like an additional management layer on top of containers (like Docker). Kubernetes is used to orchestrate multiple containers that work together (e.g. multiple services, each in its own container that depend on one another)

 

This is where companies like Amazon, Google and Microsoft come in: They provide a platform to run such containers which are then used to provide service(s) to customers. No one signs in to these machines directly to get work done. The machines are there to provide a service.

 

(And yes, they also provide other services like hosting so you can also run virtual machines on their platform in case you need a "real" machine)


Remember to quote or @mention others, so they are notified of your reply

Link to post
Share on other sites
Posted · Original PosterOP
1 hour ago, Eigenvektor said:

For a machine with data that you want to keep and want to be able to log into to do work, something like VirtualBox, VMWare, KVM/QEMU is the better option. Create a virtual machine, install a Linux distro and then use it like you would a physical machine. Start it, install updates and programs you need, remote into it, work on whatever you want, shut it down.

 

A docker container is based on an image. An image usually contains only the essential stuff needed to provide the one service it was made for. The image itself is immutable. When you stop and restart the container it is back to its starting point (a bit like a snapshot + rollback in a virtual machine).

 

If you need a cluster, start multiple containers based on the same image. You do not install updates inside the container because they would be lost when the container is restarted. Instead you create a new image with the new version and replace the old container.

 

Think of Kubernetes like an additional management layer on top of containers (like Docker). Kubernetes is used to orchestrate multiple containers that work together (e.g. multiple services, each in its own container that depend on one another)

 

This is where companies like Amazon, Google and Microsoft come in: They provide a platform to run such containers which are then used to provide service(s) to customers. No one signs in to these machines directly to get work done. The machines are there to provide a service.

 

(And yes, they also provide other services like hosting so you can also run virtual machines on their platform in case you need a "real" machine)

I see. This explains a lot!

 

I hope that the other people who find this thread from google also learn that docker shouldn't be used for virtualization.

 

I will attempt to use OpenVZ to provision some space  and resources for my friend to run his code.

 

Thank you!


OFF TOPIC: I suggest every poll from now on to have "**CK EA" option instead of "Other"

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×