containers

How to specify Http Request timeout parameter on Java servlet container

淺唱寂寞╮ 提交于 2019-11-26 22:00:00
问题 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 the parameter the container dictates? Or maybe the request timeout time isn't even something I can control and each browser decides on this on its own? (Just to be clear I'm not talking about session timeout) 回答1: The timeout from a client (i.e.

Copy map values to vector in STL

老子叫甜甜 提交于 2019-11-26 21:38:40
Working my way through Effective STL at the moment. Item 5 suggests that it's usually preferable to use range member functions to their single element counterparts. I currently wish to copy all the values in a map (i.e. - I don't need the keys) to a vector. What is the cleanest way to do this? You can't easily use a range here becuase the iterator you get from a map refers to a std::pair, where the iterators you would use to insert into a vector refers to an object of the type stored in the vector, which is (if you are discarding the key) not a pair. I really don't think it gets much cleaner

Docker container doesn't reload Angular app

好久不见. 提交于 2019-11-26 21:14:52
问题 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 . /usr/src/app EXPOSE 4200 CMD [ "npm", "start" ]' And my docker-compose.yml web: build: . ports: - '8089:4200' volumes: - .:/usr/src/app/ environment: - NODE_ENV=dev command: bash -c "npm start" Everything works great when I run it but the editing file does

ItemContainerGenerator.ContainerFromItem() returns null?

谁都会走 提交于 2019-11-26 20:52:30
I'm having a bit of weird behavior that I can't seem to work out. When I iterate through the items in my ListBox.ItemsSource property, I can't seem to get the container? I'm expecting to see a ListBoxItem returned, but I only get null. Any ideas? Here's the bit of code I'm using: this.lstResults.ItemsSource.ForEach(t => { ListBoxItem lbi = this.lstResults.ItemContainerGenerator.ContainerFromItem(t) as ListBoxItem; if (lbi != null) { this.AddToolTip(lbi); } }); The ItemsSource is currently set to a Dictionary and does contain a number of KVPs. Phred Menyhert I found something that worked better

How do I mount a Docker volume while using a Windows host?

ε祈祈猫儿з 提交于 2019-11-26 20:28:27
问题 Mounting a Docker volume while being under a Windows host, has been a huge pain for me, and I could not get it to work. Currently I got the following simple Dockerfile: FROM php:5-apache RUN apt-get update When I build an image from it, and start a container docker build -t phisch:dev . docker run phisch:dev the container starts properly. But when I am trying to mount a volume, docker run -v /c/Users/phisch/dev/htdocs:/var/www phisch:dev the following message will be displayed: C:\Users

How to access tomcat running in docker container from browser?

不问归期 提交于 2019-11-26 20:01:09
问题 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 is available on the port 8888. I am able to get the response in the boot2docker when I execute the following command curl localhost:8888 But I would like to access the page from my web browser installed in my PC (which is out of the Virtual Box, the

c++ template class; function with arbitrary container type, how to define it?

我怕爱的太早我们不能终老 提交于 2019-11-26 19:30:40
问题 Okay, simple template question. Say I define my template class something like this: template<typename T> class foo { public: foo(T const& first, T const& second) : first(first), second(second) {} template<typename C> void bar(C& container, T const& baz) { //... } private: T first; T second; } The question is about my bar function... I need it to be able to use a standard container of some sort, which is why I included the template/typename C part, to define that container type. But apparently

How to get the list of dependent child images in Docker?

半世苍凉 提交于 2019-11-26 18:52:40
问题 I'm trying to remove an image and I get: # docker rmi f50f9524513f Failed to remove image (f50f9524513f): Error response from daemon: conflict: unable to delete f50f9524513f (cannot be forced) - image has dependent child images This is the docker version: # docker version Client: Version: 1.10.3 API version: 1.22 Go version: go1.5.3 Git commit: 20f81dd Built: Thu Mar 10 21:49:11 2016 OS/Arch: linux/amd64 Server: Version: 1.10.3 API version: 1.22 Go version: go1.5.3 Git commit: 20f81dd Built:

docker: “build” requires 1 argument. See 'docker build --help'

强颜欢笑 提交于 2019-11-26 18:52:16
问题 Trying to follow the instructions for building a docker image from the docker website. https://docs.docker.com/examples/running_redis_service/ this is the error I get will following the instructions on the doc and using this Dockerfile FROM ubuntu:14.04 RUN apt-get update && apt-get install -y redis-server EXPOSE 6379 ENTRYPOINT ["/usr/bin/redis-server"] sudo docker build -t myrepo/redis docker: "build" requires 1 argument. See 'docker build --help'. How do resolve? 回答1: You need to add a dot

Why docker container name has an random number at the end?

我只是一个虾纸丫 提交于 2019-11-26 17:18:00
问题 I have a docker-compose.yml file as below (a piece of it): version: '3.5' services: framework: image: ${DOCKER_REGISTRY}/gme/fmk:${COMPOSE_PROJECT_NAME} build: ./fmk ports: - "2020:2020" - "2025:2025" - "4999:4999" volumes: - ${FOLDER_ENV}/workspace/logs/framework:/var/log/gcti - ${FOLDER_ENV}/..:/usr/local/genesys/gsg_qaart what I got is: vagrant@docker:/repos/gsg_qaart/docker$ docker-compose ps ] Name Command State Ports ----------------------------------------------------------------------