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
26
votes
5 answers

Auto expanding Container in flutter -- for all devices

I need a Container with some text in to auto expand. I have an API call, which can be anything from 5 words to 500 words. I don't want to just have 1 fixed size that's huge, but contains 10 words. I have tried Expanded() and SizedBox.Expand(), but I…
Randy
  • 381
  • 1
  • 4
  • 5
26
votes
3 answers

Why "Docker run" creates new container every time?

I ran docker run ubuntu couple of times. When I list the containers using docker ps -a, it list down many containers with different ID. Why does docker creates new container every time instead of the one which is not in use? Doesn't that container…
itspr
  • 273
  • 1
  • 3
  • 6
26
votes
1 answer

How to run an existing stopped container and get inside the bash?

I am a newbie to Docker, and I know that in order to run a container I can use the following command: docker run -it --name custom-container-name --hostname custom-hostname image-name bash The previous command creates a container named…
lmiguelvargasf
  • 63,191
  • 45
  • 217
  • 228
26
votes
6 answers

Where are docker images and containers stored when we use it with Windows?

NOTE: Am super new to both Windows and Docker The tutorial I've been using says that they are under /var/lib/docker/containers if we're using Linux, but I can't seem to find that on my Windows machine. Thanks!
Mina Han
  • 671
  • 2
  • 10
  • 17
26
votes
5 answers

How to access tomcat running in docker container from browser?

I am running tomcat in my docker container from the Official Repo. docker pull tomcat And as per guidelines stated in the homepage I've run the instance and the Tomcat server is started docker run -it --rm -p 8888:8080 tomcat:8.0 And Tomcat server…
JavaTechnical
  • 8,846
  • 8
  • 61
  • 97
26
votes
7 answers

Is there a sorted collection type in .NET?

I'm looking for a container that keeps all its items in order. I looked at SortedList, but that requires a separate key, and does not allow duplicate keys. I could also just use an unsorted container and explicitly sort it after each…
Eclipse
  • 44,851
  • 20
  • 112
  • 171
25
votes
4 answers

STL container with a specific type as a generic argument

Is there any way that I can make a function which takes a container with a specific type (lets say std::string) as a parameter void foo(const std::container &cont) { for(std::string val: cont) { std::cout << val << std::endl; …
chatzich
  • 1,083
  • 2
  • 11
  • 26
25
votes
5 answers

Docker never runs on Azure - Waiting for response to warmup request for container

I'm trying to deploy a dockerized app on Azure's App Service. I enter all the fields correctly, my image gets pulled, put I keep getting this error until something times out. Waiting for response to warmup request for container -
Etienne Berube
  • 547
  • 1
  • 7
  • 21
25
votes
8 answers

Docker container doesn't reload Angular app

I have some issue with ng serve in my docker container running by docker-compose. Dockerfile FROM node:7.1 RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY package.json /usr/src/app RUN npm install RUN npm install -g angular-cli COPY .…
gargi258
  • 829
  • 1
  • 10
  • 16
25
votes
2 answers

'make' command not found in docker container

I have a docker image which is running docker host with ubuntu 14.04. In one of the containers, I am trying to run zookeeper and install librdkafka libraries(pre-requisite library) for kafka to connect to 3rd party software. I need the 'make'…
Omkar
  • 2,274
  • 6
  • 21
  • 34
25
votes
6 answers

C++ STL list vs set

Which of those two is faster for random insertions and deletions? My guess is list. Though having the values as the keys as in the case of sets is attractive too. Is performance similar for iterating over the whole container?
user240137
  • 693
  • 4
  • 10
  • 15
25
votes
5 answers

c# stack queue combination

is there in C# some already defined generic container which can be used as Stack and as Queue at the same time? I just want to be able to append elements either to the end, or to the front of the queue thanks
Mat
  • 11,263
  • 10
  • 45
  • 48
25
votes
3 answers

How to specify Http Request timeout parameter on Java servlet container

I'm trying to understand where I can configure a request timeout for all requests arriving to a servlet of mine (or all of my servlets)? Is that, as I think, a container property? Also, how does this affect different browsers? Do they all comply to…
Ittai
  • 5,625
  • 14
  • 60
  • 97
24
votes
2 answers

Is there a way to get git to work properly from within a dev container using VS Code?

I am working with VS Code and I installed the Remote Development extension. I created a devcontainer for my Angular application. So far, everything works fine. The Dockerfile and the devcontainer.json files are pretty simple: Dockerfile: FROM…
michael
  • 787
  • 2
  • 6
  • 12
24
votes
7 answers

some containers in stl don't have find function

Some of the STL containers such as std::list and std::vector don't have find() method as a member function. Why is that? I know that there is the alternative of using std::find from but still this use isn't 100% natural.
Hanna Khalil
  • 975
  • 1
  • 10
  • 28