containers

Docker on CentOS with bridge to LAN network

我是研究僧i 提交于 2019-11-28 07:53:38
I have a server VLAN of 10.101.10.0/24 and my Docker host is 10.101.10.31. How do I configure a bridge network on my Docker host (VM) so that all the containers can connect directly to my LAN network without having to redirect ports around on the default 172.17.0.0/16? I tried searching but all the howtos I've found so far have resulted in losing SSH session which I had to go into the VM from a console to revert the steps I did. There's multiple ways this can be done. The two I've had most success with are routing a subnet to a docker bridge and using a custom bridge on the host LAN. Docker

How to Dockerize windows application

我们两清 提交于 2019-11-28 06:22:44
问题 i have a windows application which I want to containerize. Its a windows desktop application (not web application). I did some searching and found very little about containerizing desktop application. The application which I want to containerize works fine on WindowsServerCore. I have Windowsservercore image on my machine. I want to know how can I go about containerizing it. Any documentation or useful videos are available? when i completed dockerfile can i interact with my application gui???

Best string container: StringCollection, Collection<string>, List<string>, ArrayList, ..?

和自甴很熟 提交于 2019-11-28 06:17:16
What is the most suitable container just for strings holding in some array with non-predetermined upper boundary, which length is unknown on it's creation. For simple code like: var list = new SomeContainer(); // size is unknown for()/foreach()/do()/while() // any loop { list.Add(string); } Is it StringCollection as optimized Collection for string, or just Collection<string> or List<string> or ArrayList ? What is the different between them? For what you need, List<string> is probably the most versatile. StringCollection was handy in 1.1, when (without generics) you needed specific classes for

Looking for Prism example of Modules loading themselves into a menu

☆樱花仙子☆ 提交于 2019-11-28 06:02:55
Does anyone know of WPF code examples using Prism in which modules each register themselves as a menuitem in a menu within another module? (I've currently got an application which tries to do this with the EventAggregator, so one module listens for published events from other modules which need to have their title in the menu as a menu item, but I'm getting problems with the order of loading and threading etc. I want to find an example that uses classic Prism structure to do this.) I'm thinking in terms of this: Shell.xaml: <DockPanel> <TextBlock Text="Menu:" DockPanel.Dock="Top"/> <Menu Name=

mutable vs. immutable in Scala collections

↘锁芯ラ 提交于 2019-11-28 05:43:04
I am fairly new to Scala and am trying to understand the collections hierarchy. I see that there is a distinction between 'mutable' and 'immutable' collections, but I don't understand what this actually means at the implementation level and how this relates to val and var . Can anyone give me some insight on this? Also, does every collection class have a 'mutable' version and an 'immutable' version, or are there some classes which can only be 'mutable' or 'immutable'? Mutable means you can alter the collection in-place. So, if you have a collection c and you append an element with += , then c

Using an IDE while developing on a docker container

一世执手 提交于 2019-11-28 04:54:12
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 development machine, since the IDE which I am going to use is going to look for runtime libraries on the local machine not the docker container. Is this right or am I missing something? Somethings I will be able to do entirely on the docker container like setting up a database but some things I will also have to do on my local development machine and

How to make my uninitialised_allocator safe?

南笙酒味 提交于 2019-11-28 04:50:51
问题 Following from this question, I want to use an unitialised_allocator with, say, std::vector to avoid default initialisation of elements upon construction (or resize() of the std::vector (see also here for a use case). My current design looks like this: // based on a design by Jared Hoberock template<typename T, typename base_allocator > struct uninitialised_allocator : base_allocator::template rebind<T>::other { // added by Walter Q: IS THIS THE CORRECT CONDITION? static_assert(std::is

What's the difference between std::multimap<key, value> and std::map<key, std::set<value> >

空扰寡人 提交于 2019-11-28 04:48:30
I found that they have one key and multiple values which is unique. The multimap stores pairs of (key, value) where both key and value can appear several times. The map<key, set<value>> will only store each value once for a specific key. To do that, it will have to be able to compare the values, not just the keys. It depends on your application if the values that compare equal are equivalent, or if you wish to store them separately anyway. Perhaps they contain fields that are different but do not take part in the comparison for the set. A std::map is an associative container, that allows you

Should custom containers have free begin/end functions?

浪子不回头ぞ 提交于 2019-11-28 04:17:16
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 introduces two new concepts - range-based for loop and std::begin/end. Range-based for loop understands member begin/end functions, so any C++03 containers support range-based for out of the box. For algorithms the recommended way (according to 'Writing modern C++ code' by Herb Sutter) is to use std::begin instead of member function. However, at this point

Docker in Docker cannot mount volume

痞子三分冷 提交于 2019-11-28 03:54:54
I am running a Jenkins cluster where in the Master and Slave, both are running as a Docker containers. The Host is latest boot2docker VM running on MacOS. To allow Jenkins to be able to perform deployment using Docker, I have mounted the docker.sock and docker client from the host to the Jenkins container like this :- docker run -v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):/usr/bin/docker -v $HOST_JENKINS_DATA_DIRECTORY/jenkins_data:/var/jenkins_home -v $HOST_SSH_KEYS_DIRECTORY/.ssh/:/var/jenkins_home/.ssh/ -p 8080:8080 jenkins I am facing issues while mounting a volume to