Hot answers tagged

4

There are 2 really major points for Docker containers. You make sure the app dependencies are versioned and encapsulated inside the container. Container runs smoothly eveywhere, as long as you have the Docker daemon. You have the capability to create/destroy a container on any time, also known as ephemeral property. You could test easily, maintain N of ...


4

Just a quick follow-up on pumba. Installation (for Ubuntu): $ curl -SL https://github.com/alexei-led/pumba/releases/download/0.7.2/pumba_linux_amd64 -O $ sudo mv pumba_linux_amd64 /usr/bin/pumba $ sudo chmod +x /usr/bin/pumba $ pumba --version It uses stress-ng under the hood, so same commands apply. Examples: $ pumba stress -d 1m container_name -d 1m - ...


3

You can use Docker volume mounts at run time. For example: $ mkdir -p app/src logs $ touch app/src/foo.c logs/bar.txt $ docker run --rm -v $PWD/app:/app -v $PWD/logs:/app/logs alpine ls -l /app /app/src /app/logs /app: total 8 drwxr-xr-x 2 1000 1000 4096 May 6 23:33 logs drwxr-xr-x 2 1000 1000 4096 May 6 23:33 src /app/...


3

As for the tool kind of a thing, I think you're looking for something like pumba


3

Yes, as long as you have the Docker daemon running on the CentOS. Docker heavily utilizes a set of kernel features - namespaces and cgroups. That set comes native for all Linux derivatives. In terms of 'porting' the image, you have 2 widely used options: docker save on your Ubuntu host. Get the saved archive to your CentOS and load the image with docker ...


2

docker.containers.create() is documented to: Create a container without starting it. Similar to docker create. Either call docker.containers.run() instead, or given the container object returned from create(), call ingreedy.start(). (docker ps by default only shows running containers; docker ps -a should show the container in a "created" state.)


1

Just found this question from 5 days ago because I ran into the same thing on a RPi 4, also using the convenience script. Just waiting a bit did not seem to help. So I killed the process after a while. And Docker is running just fine, now.


1

Assuming a docker file like this... FROM ubuntu:18.04 ARG TF_VERSION=0.12.25 RUN apt-get install wget -y RUN wget -O terraform.zip https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip In your GitHub action you would need to get the current version from your Dockerfile. export CURRENT_TF_VERSION=$(grep -Eo '[[:...


1

I believe that the problem lies on your proxy environment variables. $ docker run \ --name myjenkins \ -p 7000:8080 \ -p 50000:50000 \ --env HTTP_PROXY="http:// localhost:8080" \ --env HTTPS_PROXY="https:// localhost:8080" \ -v /var/jenkins_home \ jenkins The values of $HTTP_PROXY and $HTTP_PROXY are not supposed to have space ...


1

Found out that there is no specific 'default' storageclass(SC) type for Docker EE or others, it depends on the requirement and specific to Kubernetes provider(s). I went ahead and created a sc with 'local' provisioner type.


1

Add a config file with parameters used in install/run script. You can look at Harbor (Github, install docs) as an example of doing just that (and they have a configuration migrator).


1

If you run docker run --rm -it alpine:3.7 /bin/sh, created docker container will use default bridge network. You can see the properties of this network using the following command: docker network inspect bridge. You can see there to which host interface (usually docker0) the network is associated and also what is the subnet for this network (usually 172.17....


1

As per Docker Documentation RUN has 2 forms: RUN <command> (shell form, the command is run in a shell, which by default is /bin/sh -c on Linux or cmd /S /C on Windows) RUN ["executable", "param1", "param2"] (exec form) The RUN instruction will execute any commands in a new layer on top of the current image and commit the results. ...


1

Docker can either run the command using the equivalent of the OS exec syscall directly in the kernel, or it can run a shell (typically /bin/sh) to call your command. A shell provides functionality you are accustom to from the command line, including: I/O redirection and pipes (>, >>, <, etc) Command chaining (&& and ||) Variable ...


1

It looks like there are two different problems here, so I'll answer them separately. First, we'll talk about the errors of this type: Error: Unsupported argument on main.tf line 8, in resource "docker_service" "mysql-service": 8: secrets = { An argument named "secrets" is not expected here. Did you mean to define a block of type "secrets"? ...


1

These were made as errors in 0.12. You need to put these into tfvars file in a locals definition. locals { secret_id = "docker_secret.mysql_db_password.id" secret_name = "docker_secret.mysql_db_password.name" file_name = "/run/secrets/docker_secret.mysql_db_password.name" } Update: Using a list: locals { secrets = [ { ...


1

I don't think volumes can be specified with relative paths. Put an absolute path instead of ./elastic-stack-ca.p12 and you should be fine.


1

Using docker-compose version 3.3 extensions and with the long variants for ports & volumes: version: '3.3' services: s1: &s build: . ports: - published: 5001 target: 9000 volumes: - source: ../www1 target: /var/www s2: <<: *s ports: - published: 5002 volumes: - source: ../www2 s3: &...


Only top voted, non community-wiki answers of a minimum length are eligible