containers

Is it possible to run GUI apps in windows containers?

爷,独闯天下 提交于 2019-12-04 09:34:55
问题 So I'm playing around with this containers concept and specificlly windows containers. I managed to run containers using the windows nanoserver image, however this image meant to services and does not support gui applications (or 32 bit apps). Couldn't find any mentioning of running gui applications (and see there gui) using windows container (found only linux container gui). is there a way to run GUI apps in containers? and so how do I can create my own image containing this support? 回答1:

SFINAE compiler troubles

一世执手 提交于 2019-12-04 09:34:03
问题 The following code of mine should detect whether T has begin and end methods: template <typename T> struct is_container { template <typename U, typename U::const_iterator (U::*)() const, typename U::const_iterator (U::*)() const> struct sfinae {}; template <typename U> static char test(sfinae<U, &U::begin, &U::end>*); template <typename U> static long test(...); enum { value = (1 == sizeof test<T>(0)) }; }; And here is some test code: #include <iostream> #include <vector> #include <list>

Add bind mount to Dockerfile just like volume

我的未来我决定 提交于 2019-12-04 08:24:46
问题 I want to add the bind mount to docker file just like I initialise a volume inside Dockefile. Is there any way for it? 回答1: A Dockerfile defines how an image is built, not how it's used - so you can't specify the bind mount in a Dockerfile. Try using docker-compose instead. A simple docker-compose.yml that mounts a directory for you would look like this: version: '3.1' services: mycontainer: image: myimage build: . volumes: - './path/on/docker/host:/path/inside/container' The build: . is

is it possible to run linux perf tool inside docker container

大兔子大兔子 提交于 2019-12-04 07:37:38
I tried giving the below command from container and found the below issue, may be because of "-moby" kernel version. Can't we get a docker image without word "-moby" coming in linux kernel version. I tried installing linux perf tool on VM having ubuntu and it worked. #docker run -t -i ubuntu:14.04 /bin/bash root@214daea94f4f:/# perf WARNING: perf not found for kernel 4.9.41 You may need to install the following packages for this specific kernel: linux-tools-4.9.41-moby linux-cloud-tools-4.9.41-moby You may also want to install one of the following packages to keep up to date: linux-tools-moby

List only stopped Docker containers

心不动则不痛 提交于 2019-12-04 07:28:20
问题 Docker gives you a way of listing running containers or all containers including stopped ones. This can be done by: $ docker ps # To list running containers Or by $ docker ps -a # To list running and stopped containers Do we have a way of only listing containers that have been stopped? 回答1: Only stopped containers can be listed using: docker ps --filter "status=exited" or docker ps -f "status=exited" 回答2: The typical command is: docker container ls -f 'status=exited' However, this will only

LXC with Open vSwitch

两盒软妹~` 提交于 2019-12-04 07:28:06
I want to try OVS (software Linux switch) http://openvswitch.org/ with my LXC container with Ubuntu as host and guest. So I have installed it: # apt-get install openvswitch-switch Configured according this doc https://infologs.wordpress.com/2015/06/19/how-to-attach-lxc-container-to-ovs-openvswitch/ Created test container: # lxc-create -t ubuntu -n veth03-ovs -- -r trusty Created ovs bridge and assigned IP to it: # ovs-vsctl add-br switch0 # ip add add 192.168.100.1/24 dev switch0 Let it be new network 192.168.100.0/24 and switch0 (according to my understanding) will be first address (gateway)

Cannot `ssh` from container with `openvpn`

China☆狼群 提交于 2019-12-04 06:55:48
问题 Basic setup Using: Fedora 30, fully upgraded (kernel 5.1.19) Podman 1.4.4 I have this Dockerfile: FROM fedora:30 ENV LANG C.UTF-8 RUN dnf upgrade -y \ && dnf install -y \ openssh-clients \ openvpn \ slirp4netns \ && dnf clean all CMD ["openvpn", "--config", "/vpn/ovpn.config", "--auth-user-pass", "/vpn/ovpn.auth"] Which I build with: podman build -t peque/vpn . Now, in order to be able to run it successfully, I have to take care of some SELinux issues (see Connect to VPN with Podman). Fixing

mtune and march when compiling in a docker image

时光毁灭记忆、已成空白 提交于 2019-12-04 06:37:10
When compiling in a docker image (i.e. in the dockerfile), what should march and mtune be set to? Note this is not about compiling in a running container, but compiling when the container is being built (e.g. building tools from source when the image is run). For example, currently when I run docker build and install R packages from source I get loads of (could be g++/gcc/f95 ...): g++ -std=gnu++14 [...] -O3 -march=native -mtune=native -fPIC [...] If I use native in an image built by Dockerhub, I guess this will use the spec of the machine used by Dockerhub, and this will impact the image

Bootstrap 4 container fluid unwanted margins [duplicate]

我是研究僧i 提交于 2019-12-04 06:34:11
问题 This question already has answers here : Bootstrap 4 correct way to use row and col classes [duplicate] (1 answer) Bootstrap - do we have to use rows and columns? (2 answers) Closed 11 months ago . I'm writing a page in html using Bootstrap 4.2. I would like to have a horizontal navigation bar at the top of the page, that occupies the whole width of the page, and remains static during navigation. I tried to use a few divs with the class "container-fluid". The problem is that a margin appears

An std container inside a template method

蓝咒 提交于 2019-12-04 05:58:25
Greetings. I don't know very well how to explain myself, but I believe a piece of code will make you understand what I'm intenting to do : template<class A, class B> void myFunction(A<B>& list) { typename A<B>::iterator current = list.begin(); typename A<B>::iterator end = list.end(); while (current != end) { current++; } } Where A is an STL container (vector, list...). It's like inception, but with templates : a template, inside a template, etc... The thing is : what do you do when one of the params of your template is itself a template... and still want to support every types supported by