containers

Need for service discovery for docker engine swarm mode

限于喜欢 提交于 2019-12-05 17:27:21
I'm confused about docker swarm. As far as I know, the old way to run a swarm was to run manager and workers in containers, before docker engine provided native support for swarm mode. Documentation for the old, containerized swarm explained how to setup service discovery using consul, etcd or zookeeper. Service discovery is necessary, as services are ran at random ports to avoid collisions, right? Documentation for the docker engine swarm mode doesn't explain how to setup service discovery. Now I'm confused, if the mechanism is included in swarm mode, or is the documentation incomplete. Where

Refactoring a “dumb” function into generic STL-style with iterators to containers

风格不统一 提交于 2019-12-05 16:34:57
I've managed to wrap my head around some of C++'s functional capacities (for_each, mapping functions, using iterators...) but the construction of the templates and function argument lists for taking in generic containers and iterators still eludes me. I have a practical example I'm hoping someone can illustrate for me: Take the following function that processes an incoming std::vector and builds a running total of many data-points/iterations of a process: /* the for-loop method - not very savvy */ void UpdateRunningTotal (int_vec& total, int_vec& data_point) { for (int i = 0; i < V_SIZE; i++)

Unable to locate package while building Docker image

旧街凉风 提交于 2019-12-05 16:34:28
During my Docker container build process, I attemptted to install a few packages using apt-get install. However the process failed to complete because the 3 of the 4 packages could not be found. Step 1 : RUN apt-get update && apt-get install -y netcat ca-certificates build-essential libssl-dev ---> Running in 38d22d97ec4a Err http://http.debian.net jessie InRelease Err http://http.debian.net jessie-updates InRelease Err http://security.debian.org jessie/updates InRelease Err http://http.debian.net jessie Release.gpg Could not resolve 'http.debian.net' Err http://security.debian.org jessie

Integer index-able RAII container for non-copyable type

你。 提交于 2019-12-05 16:26:32
Is there a standard container that has the same general API as vector<T> but that populates new locations via direct default construction? Background: I have a type that disallows copying but has a default constructor and what I really want to do is this: vector<NoCopy> bag(some_size); // use bag[i]'s return; // bag & contents get correctly cleaned up. However, this doesn't work because vector<T>(int) is implemented in terms of default constructing an object and then copying it into each of the new locations. Edit: Not C++0xB (a.k.a. C++11) One option would be to upgrade to a C++11-compliant

A completely closed source docker container

。_饼干妹妹 提交于 2019-12-05 15:08:42
I was wondering if it is possible to offer Docker images, but not allow any access to the internals of the built containers. Basically, the user of the container images can use the services they provide, but can't dig into any of the code within the containers. Call it a way to obfuscate the source code, but also offer a service (the software) to someone on the basis of the container, instead of offering the software itself. Something like "Container as a Service", but with the main advantage that the developer can use these container(s) for local development too, but with no access to the

Docker container mongod error when starting via ssh

痴心易碎 提交于 2019-12-05 14:53:50
I have installed mongodb on a docker container together with openssh on ubuntu 14.04. The container is running with ssh but when I ssh into the container I get the following error when trying to start mongod. root@430f9502ba2d:~# service mongod start Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service mongod start Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the start(8) utility, e.g. start mongod Also start mongod does not affect anything. Tried looking at this also Mongo daemon doesn't run by

How do I perform a push segue within a container

旧时模样 提交于 2019-12-05 14:27:45
问题 Hi I am programming an app for ios6 and and am using the new container feature. It all works but when i perform a push segue, it pushes, but does it full screen. I want the 'View after Segue to be in the container also. Can anyone help? ....... ....... 回答1: I've found the answer to my own Question! (...Again) Instead of putting the navigation controller here: I put it here: 来源: https://stackoverflow.com/questions/14068308/how-do-i-perform-a-push-segue-within-a-container

What container to store unique values?

你离开我真会死。 提交于 2019-12-05 13:51:58
问题 I've got the following problem. I have a game which runs on average 60 frames per second. Each frame I need to store values in a container and there must be no duplicates. It probably has to store less than 100 items per frame, but the number of insert-calls will be alot more (and many rejected due to it has to be unique). Only at the end of the frame do I need to traverse the container. So about 60 iterations of the container per frame, but alot more insertions. Keep in mind the items to

Bind a directory to a docker container

泪湿孤枕 提交于 2019-12-05 13:11:33
问题 I'm building a test project that requires a module outside of the project directory. The project folder is in docker, and I would like to bind that module directory to the docker container of my project. Is it even possible to do it? Or am I asking the wrong question? By the way, I'm still new to docker so I'm just trying things out. 回答1: My understand is, you need mount the host folder to the container. So try this: docker run -v /host/project_folder:/container/project -t avian/project_image

Google Cloud Kubernetes accessing private Docker Hub hosted images

[亡魂溺海] 提交于 2019-12-05 11:58:19
Is it possible, to pull private images from Docker Hub to a Google Cloud Kubernetes cluster? Is this recommended, or do I need to push my private images also to Google Cloud? I read the documentation, but I found nothing that could explain me this clearly. It seems that it is possible, but I don´t know if it's recommended. There is no restriction to use any registry you want. If you just use the image name, (e.g., image: nginx) in pod specification, the image will be pulled from public docker hub registry with tag assumed as :latest As mentioned in the Kubernetes documentation : The image