containers

What's the purpose of reexec.Init() in docker?

蓝咒 提交于 2021-02-08 07:19:12
问题 When reading the source code of docker1.8, I find that reexec.Init() appears in docker.go , dockerinit.go and some test files. If reexec has registered functions, then reexec.Init() will return true so that in docker.go the process will return. From the README.md of package reexec : The reexec package facilitates the busybox style reexec of the docker binary that we require because of the forking limitations of using Go. So what's the purpose of using reexec.Init() ? Is the only purpose of

How to set heap size for wildfly inside Docker container?

好久不见. 提交于 2021-02-07 13:42:08
问题 I am trying to increase heap size for wildfly in docker container. This is easily done by updating wildfly/bin/standalone.conf in a regular wildfly setup. Our base docker image for wildfly has a default heapsize of 512 MB which is required to be 1GB in one of the web apps. One way to go is by simple text replace in the Docker file using sed command - RUN sed -i -- 's/JAVA_OPTS="-Xms64m -Xmx512m -XX:MaxPermSize=256m/JAVA_OPTS="-Xms2048m -Xmx6144m -XX:MaxPermSize=256m/g' /path/standalone.conf I

How to set heap size for wildfly inside Docker container?

ⅰ亾dé卋堺 提交于 2021-02-07 13:41:09
问题 I am trying to increase heap size for wildfly in docker container. This is easily done by updating wildfly/bin/standalone.conf in a regular wildfly setup. Our base docker image for wildfly has a default heapsize of 512 MB which is required to be 1GB in one of the web apps. One way to go is by simple text replace in the Docker file using sed command - RUN sed -i -- 's/JAVA_OPTS="-Xms64m -Xmx512m -XX:MaxPermSize=256m/JAVA_OPTS="-Xms2048m -Xmx6144m -XX:MaxPermSize=256m/g' /path/standalone.conf I

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

懵懂的女人 提交于 2021-02-07 13:21:59
问题 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 mcr.microsoft.com/vscode/devcontainers/typescript-node:0-12 devcontainer.json : { "name": "Angular App", "dockerFile": "Dockerfile", "settings": { "git.path": "/usr/bin/git", "terminal.integrated.shell.linux": "/bin/bash" }, "extensions": [ "angular.ng

Docker container's sshfs mount freezes, but only when mounted by Python

浪尽此生 提交于 2021-02-07 12:49:21
问题 I have a development laptop ( Mint 19.3 ), and a test server ( Ubuntu 18.04.4 LTS ). The laptop is Docker version 19.03.5, build 633a0ea838 , the server is Docker version 19.03.12, build 48a66213fe I'm running Python 3.6 code inside the container, which uses subprocess (code below) to create an sshfs mount to a third server, after which the python code walks through the mounted directory. Everything works fine on my development laptop. But on the server, the directory mounts (and is seen with

Using docker swarm to execute singular containers rather than “services”

牧云@^-^@ 提交于 2021-02-07 04:01:58
问题 I really enjoy the concept of having a cluster of docker machines available to execute docker services. I also like the additional features not available to singular docker containers (such as docker secret). But I really have no need for long-standing services. My use case is to simply execute a bash script to use the docker swarm to take in an arbitrary number of finite commands, and execute each as a running docker container on the same docker image, while using the secrets loaded up with

How to prevent Java from exceeding the container memory limits?

百般思念 提交于 2021-02-06 05:53:17
问题 I'm running a Java program inside a Docker container that has a hard memory limit of 4GB. I've set the max heap to 3GB but still the Java program exceeds the limit and gets killed (OOMKilled). My question is : How can I configure Java to respect the set container limit and throw an OutOfMemoryException instead of trying to allocate beyond the limit and get its ass kicked by the host kernel? Update : I'm an experienced Java developer and have a fair understanding of the JVM. I know how to set

How to prevent Java from exceeding the container memory limits?

梦想的初衷 提交于 2021-02-06 05:52:23
问题 I'm running a Java program inside a Docker container that has a hard memory limit of 4GB. I've set the max heap to 3GB but still the Java program exceeds the limit and gets killed (OOMKilled). My question is : How can I configure Java to respect the set container limit and throw an OutOfMemoryException instead of trying to allocate beyond the limit and get its ass kicked by the host kernel? Update : I'm an experienced Java developer and have a fair understanding of the JVM. I know how to set

How to prevent Java from exceeding the container memory limits?

允我心安 提交于 2021-02-06 05:51:02
问题 I'm running a Java program inside a Docker container that has a hard memory limit of 4GB. I've set the max heap to 3GB but still the Java program exceeds the limit and gets killed (OOMKilled). My question is : How can I configure Java to respect the set container limit and throw an OutOfMemoryException instead of trying to allocate beyond the limit and get its ass kicked by the host kernel? Update : I'm an experienced Java developer and have a fair understanding of the JVM. I know how to set

How to prevent Java from exceeding the container memory limits?

為{幸葍}努か 提交于 2021-02-06 05:48:04
问题 I'm running a Java program inside a Docker container that has a hard memory limit of 4GB. I've set the max heap to 3GB but still the Java program exceeds the limit and gets killed (OOMKilled). My question is : How can I configure Java to respect the set container limit and throw an OutOfMemoryException instead of trying to allocate beyond the limit and get its ass kicked by the host kernel? Update : I'm an experienced Java developer and have a fair understanding of the JVM. I know how to set