Questions tagged [containers]

A container is a class, a data structure, or an abstract data type whose instances are collections of other objects. Containers typically make use of generics or templates so that a wide variety of objects can be added.

Containers are available in most programming languages, allowing programmers to store, transfer, and read back data within a program. Common containers include arrays, lists, queues, stacks, sets, and maps, each providing different levels of efficiency for tasks such as adding or removing elements, searching for elements, or iterating through elements.

11206 questions
21
votes
1 answer

AWS Lambda Container destroy event

When to release connections and cleanup resources in lambda. In normal Node JS application we do use the hook process.on('exit', (code) => { console.log(`About to exit with code: ${code}`); }); However this doesn't work on AWS Lambda. Resulting…
21
votes
1 answer

What's the difference between "docker start" and "docker restart"?

As it relates to stopping/starting a container? After stopping a container: docker stop It seems like I can run either "start" or "restart" to bring it back up. I'm wondering if there is any difference, or if they are functionally…
blindsnowmobile
  • 3,868
  • 6
  • 32
  • 47
21
votes
2 answers

Container technologies: docker, rkt, orchestration, kubernetes, GKE and AWS Container Service

I'm trying to get a good understanding of container technologies but am somewhat confused. It seems like certain technologies overlap different portions of the stack and different pieces of different technologies can be used as the DevOps team sees…
JL1680
  • 219
  • 2
  • 4
21
votes
5 answers

kubectl attach: Unable to use a TTY - container es-node did not allocate one

I am trying to attach to a running container in Kubernetes, however I get the error message below. >kubectl attach -it es-client-2756725635-4rk43 -c es-node Unable to use a TTY - container es-node did not allocate one If you don't see a command…
speedplane
  • 15,673
  • 16
  • 86
  • 138
21
votes
3 answers

What is the difference between the size and the virtual size of the docker images?

I have a private registry where I store all of my docker images. I noticed that when I pull an image from it,the difference in the sizes of the image on my local machine and the one on the registry is significant. For example,I have an image called…
Ilian Velchev
  • 211
  • 1
  • 2
  • 4
21
votes
3 answers

Update the limitation of memory/CPU for existing container in docker

I do know that we can create a container with memory limitation like this docker run -ti --memory-reservation 1G ubuntu:14.04 /bin/bash but how to update the limitation of memory/CPU for existing container?
Yuwen Yan
  • 4,777
  • 10
  • 33
  • 63
21
votes
4 answers

Can a reference type be used as the key type in an STL map

Can I construct an std::map where the key type is a reference type, e.g. Foo & and if not, why not?
davetapley
  • 17,000
  • 12
  • 60
  • 86
21
votes
2 answers

Safe parallel read-only access to a STL container

I want access a STL based container read-only from parallel running threads. Without using any user implemented locking. The base of the following code is C++11 with a proper implementation of the…
Peter
  • 2,240
  • 3
  • 23
  • 37
20
votes
7 answers

Can end() be a costly operation for stl containers

On https://doc-snapshots.qt.io/qtcreator-extending/coding-style.html it is recommended to write for loops like the following: Container::iterator end = large.end(); for (Container::iterator it = large.begin(); it != end; ++it) { …
Martin
  • 4,738
  • 4
  • 28
  • 57
20
votes
3 answers

singular or plural identifier for a dictionary?

When naming a container , what's a better coding style: source = {} #... source[record] = some_file or sources = {} #... sources[record] = some_file The plural reads more natural at creation; the singular at assignment. And it is not an idle…
max
  • 49,282
  • 56
  • 208
  • 355
20
votes
7 answers

Adding fonts in server core 2019ltsc container image

We have an app (GrapeCity ActiveReports) that generates pdf reports running inside a container built on the following image: microsoft/dotnet-framework:4.7.2-sdk This image is based on the 2019ltsc release, which is where the issue comes in. The pdf…
stevenmiller
  • 383
  • 1
  • 4
  • 12
20
votes
1 answer

Why is the Ubuntu docker image not a VM

I get the big difference between VMs and containers. But that has me confused about how an Ubuntu container can even exist. It feels contradictory to me since Ubuntu is an OS. https://hub.docker.com/_/ubuntu Isn't this an entire guest OS? So what…
20
votes
2 answers

Using runAsNonRoot in Kubernetes

We’ve been planning for a long time to introduce securityContext: runAsNonRoot: true as a requirement to our pod configurations for a while now. Testing this today I’ve learnt that since v1.8.4 (I think) you also have to specify a particular UID for…
Andy Hume
  • 40,474
  • 10
  • 47
  • 58
20
votes
1 answer

How to assign a name to running container in docker?

I have created container from particular image using command: $ docker run -d -P selenium/hub running container status is below: $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS …
Pratik Patel
  • 2,209
  • 3
  • 23
  • 30
20
votes
2 answers

Mount docker host volume but overwrite with container's contents

Several articles have been extremely helpful in understanding Docker's volume and data management. These two in particular are…
Jack Palkens
  • 331
  • 1
  • 2
  • 8