Skip to main content

Questions tagged [docker]

Docker images, containers, hub, and everything related to the containerization platform

Filter by
Sorted by
Tagged with
28 votes
7 answers
4k views

How to create the smallest working docker image every time?

Aim: to create the smallest working docker images every time Current REPOSITORY TAG IMAGE ID CREATED SIZE a-docker-image latest x 42 ...
030's user avatar
  • 13.2k
48 votes
7 answers
4k views

What are best and comprehensive practices to consider when running docker in production?

Finally, you are so much in love with Docker that you want to move your online business-critical production systems with sensitive customer data to a Docker Swarm. Some might even already have done so....
Ta Mu's user avatar
  • 6,782
30 votes
4 answers
13k views

What are the advantages of dockerizing nginx and php in different containers?

I just started working with Docker and Kubernetes and I've been watching a lot of stacks, in which some people build nginx+php in a single image and some build an image with nginx and another one with ...
CarlosAS's user avatar
  • 435
14 votes
2 answers
784 views

How do I automate deployments with Kubernetes?

Assuming I have Kubernetes deployed via Rancher and Jenkins is building new images and pushing them to DockerHub upon check-in of new code to GitHub, how do I automate getting new images deployed? ...
Greg's user avatar
  • 141
14 votes
5 answers
6k views

Cannot connect to chocolatey.org or any other internet site from within container

xpost from https://forums.docker.com/t/cannot-connect-to-chocolatey-org/38745 Expected behavior I'm running Windows Server 2016 Datacenter (MSDN download) 64 bit - Version 1607 - Build 14393.1715 I'...
jcolebrand's user avatar
  • 1,275
5 votes
2 answers
2k views

Coupling docker registry and source control

What are the best practices (if any) for coupling a docker image registry with a SCM service (such as bitbucket)? I know a docker registry can live in artifactory, but how can I assure that the two ...
scott's user avatar
  • 466
5 votes
1 answer
513 views

How to run a container from within another container while also mounting a volume from the first container?

I'm running a build in Jenkins which is running inside Kubernetes. When the job starts, a container starts in the cluster and the build runs inside it. A step in the build requires building an RPM ...
Itai Ganot's user avatar
146 votes
5 answers
65k views

Why it is recommended to run only one process in a container?

In many blog posts, and general opinion, there is a saying that goes "one process per container". Why does this rule exist? Why not run ntp, nginx, uwsgi and more processes in a single container that ...
Evgeny Zislis's user avatar
50 votes
2 answers
53k views

Passing secrets to a Docker container

I have a base docker image which is used to run image analysis software. For each container created from the image, there are a set of configuration settings, some of which are secrets (encryption ...
Preston Martin's user avatar
  • 3,278
30 votes
2 answers
31k views

Connect Docker container to both host and internal bridge network

I am trying to run a Docker container as a router between a private (--internal) Docker network and the predefined host network. This means the container needs to have two network interfaces: One "...
Hexaholic's user avatar
  • 571
20 votes
2 answers
7k views

Where should I put my application configuration?

I've been reading lately a debate about "Where should properties that depend on the environment be stored?". The classical way is to have multiple property files, one by environment, and based on an ...
carcaret's user avatar
  • 301
19 votes
4 answers
4k views

Are there any drawbacks of using a deb package as if it was a container to deploy an application?

My team is currently trying to decide if we should deploy our Nodejs app as a deb package instead of trying to run it in a container such as Docker. I got this idea from reading this blog here which ...
avi's user avatar
  • 1,279
16 votes
3 answers
18k views

One Jenkinsfile or multiple?

So I have a Jenkinsfile defining a build pipeline and then a Jenkins job (not pipeline) with a very simple deployment script for our Docker stacks. Seeing that Jenkinsfiles can become as complex and ...
Worp's user avatar
  • 679
13 votes
2 answers
19k views

Gitlab CI error during connect: Get http://docker:2375/v1.40/containers/json?all=1: dial tcp: lookup docker on xx.xx.xx.x:xx: no such host

I've recently created a new repository in gitlab.com, started a new Ubuntu instance in digitalocean, installed docker and gitlab-runner in the ubuntu instance. Also, did gitlab-runner register and ...
punkbit's user avatar
  • 349
12 votes
2 answers
7k views

What is the purpose of running PHP-FPM in its own container instead in the same container as apache2/nginx?

I'm fairly new to Docker so excuse any obvious ignorance or misunderstandings. That said, I've been coding and configuring web applications for a long time now. I have recently been dabbling with some ...
K8sN0v1c3's user avatar
  • 195
7 votes
3 answers
694 views

Continuous Deployment best practices for managing application configuration

My CD pipeline: Get Docker image (created and pushed during CI stage). Copy docker-compose .yml template to target server. Run the app. Let's go straight to the 3rd point. I can run the app using ...
CryptoNewbie's user avatar
7 votes
2 answers
753 views

How to move disk image in the command line?

As answered in this questions: Does Docker on MacOS support tmpfs? In order to run in memory docker, I need to move docker volumes to ramdisk. In macOS I can do it through docker preferences. However, ...
muhammad haris's user avatar
6 votes
1 answer
327 views

Implications of introducing Docker to the development team

We always tend to have a moral implications of certain critical decisions taken for development irrespective of the realisation if the decision is critical or not. Say for example switching an entire ...
Abhay Pai's user avatar
  • 303
6 votes
1 answer
8k views

How to populate docker volumes in a build step to be used by a different container

I currently have a Docker compose based web app that uses Nginx as a reverse proxy that forwards traffic to a Flask and Grafana docker instance. The task at hand is to integrate a SSG (static site ...
Moritz's user avatar
  • 1,217
6 votes
1 answer
607 views

Does the "cattle not pets" distinction apply as equally to machine instances as to containers?

There is a great discussion of the Cattle vs Pets distinction from Randy Bias here. Martin Fowler talks about a SnowFlakeServer. In a series of talks, Adrian Cockcroft talks about how they moved ...
hawkeye's user avatar
  • 1,153
5 votes
1 answer
5k views

Does Docker on MacOS support tmpfs?

I am new to Docker and I want to run Docker with ram only storage. In other words, I do not want Docker to save anything on persistent storage. I found out that on Linux Docker supports tmpfs. Is ...
muhammad haris's user avatar
4 votes
2 answers
3k views

macOS testing on Desktop: Docker containers vs. Homebrew installation

Often I test some stuff on my MacBook. Mostly database and data store related stuff (MongoDB, MariaDB, Postgres). I install the software with Homebrew and test. I wonder if I should switch to docker? ...
Sybil's user avatar
  • 452
4 votes
2 answers
225 views

On-Prem and Cloud Deployments

If I have a mix of cloud and "on-prem" (across different networks) systems to deploy to is there a common tool, technique, or software available? I've used Kubernetes for cloud deployments, but am ...
Wesley Rolnick's user avatar
4 votes
1 answer
2k views

Running multiple websites on Docker in isolated or shared database containers?

So I have been reading up on Docker, and I cannot quite get my head around this concept. There are literally dozens of tutorials on the web about spawning a Wordpress instance on Docker within 5 ...
Neograph734's user avatar
4 votes
1 answer
3k views

How do I make read only mount in Docker container writable?

When developing code on a very large repository, I would like to run multiple builds/tests in parallel in containers. I need to get my repository or some other large directory into the container. If I ...
Jiri Klouda's user avatar
  • 5,807
3 votes
2 answers
7k views

How do I make NFS volumes reliable in Docker?

I host various docker containers on my Ubuntu 18 machine. A few of them require storing their data on my Synology NAS. At first, I was using the host machine's /etc/fstab to control NFS mounts, which ...
void.pointer's user avatar
3 votes
3 answers
98 views

How to raise awareness about the security risk involved with running Docker?

I'm in the process of preparing a Docker course for students with little to no familiarities with containers, the underlying OS mechanisms involved, and their implied limitations. In many Docker ...
Sylvain Leroux's user avatar
3 votes
1 answer
8k views

docker: Error response from daemon: Conflict. The container name "/basexhttp" is already in use by container

Am I even correctly following the documentation on creating and running a docker container below? [root@ ~]# [root@ ~]# docker run -d \ > --name basexhttp \ > --publish 1984:1984 \ > ...
Nicholas Saunders's user avatar
2 votes
1 answer
157 views

How to pin public root key when downloading an image with docker pull (Docker Content Trust)?

How can I execute docker pull (with Docker Content Trust enabled) such that it fails if the image doesn't have a valid signature using the private key corresponding to (or subordinate to) the public ...
Michael Altfield's user avatar
2 votes
2 answers
3k views

Ansible - Copy multiple files

I am trying to copy multiple files to the target like so: tasks: - name: "Copying files" copy: src: files/{{ item }} dest: /my/folder/ with_items: - file.txt The files ...
Kyu96's user avatar
  • 145
2 votes
1 answer
359 views

How to Connect Docker Containers?

In "What is a container?" the docker docs show the following nifty image: For my scenario I have only App A and App B; let's designate them Alice and Bob. How do Alice and Bob communicate, ...
Nicholas Saunders's user avatar
2 votes
1 answer
1k views

Using docker with users leaves files belonging to the subuid/subgid

Background I wish to make sure all people and automated processes working with my project use the exact same version and environment of some tool which has to do work on the host file system. ...
AnoE's user avatar
  • 4,896
2 votes
1 answer
2k views

How to prevent that tags will be overwritten in docker private registries?

This is a follow-up to this question about preventing tag overwrite in docker hub. When one pushes a tag to a private docker registry and the current tag exists then it will be overwritten. How to ...
030's user avatar
  • 13.2k
2 votes
1 answer
134 views

Deploying software that depends on a virtual machine using Docker

About I am developing a piece of software which consists of a Node.js application which controls a virtual machine that runs Android-x86. Also there are some pieces of the Android SDK like ADB the ...
Bee's user avatar
  • 131
1 vote
1 answer
561 views

Is there a way to know which files have changed in a docker container compared to its base image?

Is there a way to know which files have changed in a docker container compared to its base image? I am looking both for file creation/modification/deletion, but also for metadata change like file ...
Sylvain Leroux's user avatar
1 vote
1 answer
3k views

cannot get bash prompt: Error response from daemon: Container foo is not running

A basic jetty container: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ...
Nicholas Saunders's user avatar
1 vote
4 answers
3k views

how to start a docker container which dies immediately after startup?

On the understanding, from #docker on IRC, that the basex container from docker hub died after starting up, how do I now make it run something which doesn't immediately exit? I'm only trying to get a ...
Nicholas Saunders's user avatar
0 votes
2 answers
187 views

AWS ECR start uploaded docker image?

I used packer to upload a docker image I created to my AWS ECR repository. How can I use the AWS cli to automatically locate that image, create a new cluster, set the port rules to allow all inbound ...
Kyu96's user avatar
  • 145
0 votes
1 answer
485 views

How to gain console access to a MySQL server running on a docker container from the host?

I thought I had this working a few minutes ago: root $ root $ docker container ls CONTAINER ID IMAGE COMMAND CREATED STATUS ...
Nicholas Saunders's user avatar
0 votes
1 answer
3k views

how to send a password to MySQL with docker?

Just getting started, want to run the downloaded version of mysql: root:~# root:~# docker images REPOSITORY TAG IMAGE ID CREATED SIZE basex/basexhttp ...
Nicholas Saunders's user avatar
0 votes
2 answers
358 views

CIS Benchmark for Docker and Docker Bench for Security: why, how and when?

I just learned about Docker Bench for Security and CIS Benchmark for Docker Community Edition. Why, how and when am I supposed to use these tools?
Sylvain Leroux's user avatar
0 votes
1 answer
147 views

how to push an image to docker hub?

How do I push this image to docker hub? root $ root $ docker images helloworld_web REPOSITORY TAG IMAGE ID CREATED SIZE helloworld_web latest ...
Nicholas Saunders's user avatar
0 votes
2 answers
2k views

How to copy HTML files to include into nginx?

How do I copy an index.html file into nginx? root@mordor:/home/nicholas/docker/nginx# root@mordor:/home/nicholas/docker/nginx# ll total 12 drwxrwxr-x 2 nicholas nicholas 4096 Nov 13 16:18 ./ drwxrwxr-...
Nicholas Saunders's user avatar
0 votes
1 answer
4k views

gitlab project registry - docker push fails with invalid reference format error message

I have create a personal access token for my project. in my gitlab-ci.yml I'm trying to create a docker image and then save it in my project's repository. I'm able to login - I see an explicit ...
dot's user avatar
  • 115
-1 votes
1 answer
371 views

CD (Continuous Deployment) best practices for managing configuration [duplicate]

My CD pipeline: Get docker image (created and pushed during CI stage) Copy docker-compose .yml template to target server Run the app Let's go straight to the 3rd point. I can run the app using ...
CryptoNewbie's user avatar