Questions tagged [docker]

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

Filter by
Sorted by
Tagged with
24
votes
7answers
3k 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 ...
46
votes
7answers
3k 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....
0
votes
1answer
825 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 ...
28
votes
4answers
11k 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 ...
13
votes
2answers
736 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? ...
13
votes
5answers
4k 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'...
5
votes
2answers
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 ...
133
votes
5answers
56k 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 ...
58
votes
7answers
88k views

Downloading Docker Images from Docker Hub without using Docker

I want to manually download a Docker Image from Docker Hub. More specifically, I want to download a Docker Image from Docker Hub on a machine in a restricted environment which does not (and cannot) ...
38
votes
2answers
34k 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 ...
18
votes
4answers
3k 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 ...
15
votes
3answers
14k 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 ...
4
votes
2answers
2k 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? ...
20
votes
2answers
5k 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 ...
6
votes
1answer
7k 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 ...
12
votes
2answers
14k 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 ...
7
votes
3answers
550 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 ...
6
votes
1answer
291 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 ...
3
votes
1answer
1k 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 ...
3
votes
1answer
1k 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 ...
7
votes
2answers
546 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, ...
6
votes
1answer
437 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 ...
5
votes
1answer
4k 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 ...
3
votes
1answer
2k 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 ...
3
votes
3answers
86 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 ...
3
votes
2answers
136 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 ...
2
votes
1answer
121 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 ...
2
votes
1answer
752 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. ...
2
votes
1answer
75 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, ...
2
votes
2answers
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 ...
2
votes
1answer
1k 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 ...
1
vote
4answers
759 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 ...
1
vote
1answer
3k 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 \ > ...
1
vote
1answer
44 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 ...
1
vote
1answer
56 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 ...
0
votes
2answers
284 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?
0
votes
2answers
166 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-...
0
votes
1answer
58 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 ...
0
votes
1answer
229 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 ...
0
votes
2answers
138 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 ...
0
votes
1answer
1k 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 ...
-1
votes
1answer
308 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 ...