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
75
votes
2 answers

Difference between Kubernetes and Service Fabric

I have worked on Kubernetes and currently reading about Service Fabric, I know Service Fabric provides microservices framework models like stateful, stateless and actor but other than that it also provides GuestExecutables or Containers as well…
Ali Kahoot
  • 3,371
  • 2
  • 22
  • 27
75
votes
10 answers

How to generate a Postgresql Dump from a Docker container?

I would like to have a way to enter into the Postgresql container and get a data dump from it.
Cesar Augusto Nogueira
  • 1,911
  • 1
  • 14
  • 14
74
votes
3 answers

What exactly are "containers" in python? (And what are all the python container types?)

The python documentation frequently speaks of "containers". E.g. : If check_circular is False (default: True), then the circular reference check for container types will be skipped and a circular reference will result in an OverflowError (or…
Bentley4
  • 10,678
  • 25
  • 83
  • 134
73
votes
9 answers

Returning a pointer to a vector element in c++

I have a vector of myObjects in global scope. I have a method which uses a std::vector::const_iterator to traverse the vector, and doing some comparisons to find a specific element. Once I have found the required element, I want to be able…
Krakkos
  • 1,439
  • 3
  • 19
  • 24
72
votes
2 answers

What's the benefit of std::back_inserter over std::inserter?

As far as I can tell, anywhere std::back_inserter works in an STL algorithm, you could pass an std::inserter constructed with .end() instead: std::copy(l.begin(), l.end(), std::back_inserter(dest_list)); std::copy(l.begin(), l.end(),…
NHDaly
  • 7,390
  • 4
  • 40
  • 45
69
votes
3 answers

docker no space left on device macOS

I am trying to build a docker image that requires copying some large files (~75GB) and I'm getting the following error when I run the following: $ docker build -t my-project . Step 8/10 : COPY some-large-directory failed to copy files: failed to…
Nick Fernandez
  • 1,160
  • 1
  • 10
  • 24
68
votes
3 answers

What are the differences between Kubernetes Pods and Docker Compose(s) (Composures?)

Both Kubernetes Pods and the results of Docker Compose scripts (henceforth: "Compositions") appear to result in clusters of virtual computers. The computers in the clusters can all be configured to talk to each other so you can write a single script…
Alex C
  • 16,624
  • 18
  • 66
  • 98
68
votes
2 answers

Do docker containers retain file changes?

This is a very basic question, but I'm struggling a bit and would like to make sure I understand properly. After a container is started from an image and some changes done to files within (i.e.: some data stored in the DB of a WebApp running on the…
Julian Cerruti
  • 1,918
  • 2
  • 16
  • 16
67
votes
5 answers

Cannot kill container: : tried to kill container, but did not receive an exit event

I cannot stop, remove or kill my docker container. Commands given below with their respective error messages: 1. docker stop 2. docker kill 3. docker rm I get 1. Error response from daemon: cannot stop…
lapurita
  • 945
  • 1
  • 5
  • 11
66
votes
6 answers

Is it possible to install Visual Studio in a Windows Container

Is it possible to install any version of Visual Studio in a Windows Container on a Windows Server? The motivation is to use Windows Containers for building software in continuous integration systems, so that the build environment is standardized.
66
votes
8 answers

How can I reduce the disk space used by docker?

I am running docker on windows 10. I had a couple of images stored in my machine. The total size of these images accumulated to around ~10GB. I have deleted these images via 'docker rmi -f' command. But the space occupied by these images has not…
vintrojan
  • 1,277
  • 1
  • 12
  • 22
63
votes
6 answers

Using docker-compose to set containers timezones

I have a docker-compose file running a few Dockerfiles to create my containers. I don't want to edit my Dockerfiles to set timezones because they could change at any time by members of my team and I have a docker-compose.override.yml file to make…
nobody
  • 7,803
  • 11
  • 56
  • 91
63
votes
10 answers

What is the right approach when using STL container for median calculation?

Let's say I need to retrieve the median from a sequence of 1000000 random numeric values. If using anything but std::list, I have no (built-in) way to sort sequence for median calculation. If using std::list, I can't randomly access values to…
sharkin
  • 12,162
  • 24
  • 86
  • 122
62
votes
5 answers

Using an IDE while developing on a docker container

There is something that I am not getting when developing an application while using docker containers. Lets say I am developing a java application and I set up a java container with jdk 8 base image, I still need to install java 8 jdk on my local…
61
votes
1 answer

Should custom containers have free begin/end functions?

When creating a custom container class that plays by the usual rules (i.e. works with STL algorithms, works with well-behaved generic code, etc.), in C++03 it was sufficient to implement iterator support and member begin/end functions. C++11…
zeuxcg
  • 9,216
  • 1
  • 26
  • 33