Skip to main content

Questions tagged [dockerfile]

For questions about Dockerfiles - text files containing instructions to build Docker container images.

Filter by
Sorted by
Tagged with
7 votes
1 answer
24k views

Change owner of files created inside a Docker container without changing the Dockerfile

When I create a file inside a container with docker-compose run web touch test the file owns to root:root. I want to change it to be $USER without to use chown. I'm aware of the --user option but it ...
Dougui's user avatar
  • 173
2 votes
1 answer
126 views

Scanning fs in a Docker container is (much) slower than on host?

Is scanning/searching the filesystem slower in a Docker container, than on the host? Seems a lot slower from my testing and sometimes I get an EIO scan error. Specifically I am scanning a read-only (:...
Alexander Mills's user avatar
1 vote
1 answer
369 views

Cannot connect to server running on host from Dockerfile / image build

I have a server running on localhost:3440 on the host machine. In a Dockerfile I have: RUN apt-get install -y netcat RUN nc localhost 3440 | tar -x -O > ores-$(date +%s.%N).tgz I've read that ...
Alexander Mills's user avatar
2 votes
0 answers
2k views

Can not find save handler 'redis' - session startup failed - for PHP

I am getting this error while loading index.php file. Warning: session_start(): Cannot find save handler 'redis' - session startup failed in /var/www/html/index.php on line 2 My index.php code ...
Gaurav Bhaskar's user avatar
3 votes
1 answer
156 views

Why screen folder in /var/run disappears in Docker container after running Ansible playbook?

Files I've got the following Dockerfile: FROM ansible/ansible:ubuntu1604py3 ENV DEBIAN_FRONTEND noninteractive RUN pip3 install ansible RUN printf '[local]\r\nlocalhost ansible_python_interpreter="...
kenorb's user avatar
  • 7,901
2 votes
0 answers
768 views

How to deploy with AWS CodePipeline a multicontainer docker environment without dockerfile

I'm using simple docker-compose container images. Here's my docker-compose.yml version: '2' services: db: image: postgres:10.2 ports: - "5432:5432" ...
Vitaliy Filipov's user avatar
5 votes
3 answers
27k views

How to connect to a docker container?

I have the following Dockerfile: FROM ubuntu:latest MAINTAINER Valter Silva RUN apt-get update RUN apt-get install -y apache2 ADD index.html /var/www/html/ CMD /usr/sbin/apache2ctl -D FOREGROUND ...
Valter Silva's user avatar
2 votes
1 answer
265 views

Why can I build this image from Docker for Mac but not on Docker CE for Ubuntu?

Here's my Dockerfile: FROM php:5-fpm RUN apt-get update RUN apt-get install -y php5-mysql RUN apt-get install -y php5-xdebug RUN apt-get install -y php5-mcrypt RUN apt-get install -y php5-gd When I ...
skb's user avatar
  • 23
6 votes
1 answer
35k views

COPY and ZIP files in Dockerfile

Using a COPY statement creates a new image layer, right? COPY files/foo.zip /tmp/ Now, to save space I could take the ADD statement... for a GZ arhive. But ADD does not support automatic extraction ...
Ta Mu's user avatar
  • 6,782
1 vote
2 answers
894 views

docker container for running automation scripts using jenkins

For my test environment, I am trying to setup the following setup. Create scripts in Frisby Have a jenkins job, which creates a slave which is a docker container. The docker container will ...
user1555608's user avatar
4 votes
2 answers
197 views

Docker vs CMS - related or a different thing?

I am new to DevOps and I am trying to catch the techniques and their names and meanings. I looked wikipedia explanations on Puppet (a Configuration Management System example) and that of Docker. ...
mico's user avatar
  • 525
4 votes
2 answers
210 views

How to automate the magento2 installation process too via docker

This is what I have accomplished up to now. Written a docker file where I have done the following and for now I have not used the docker compose. Used alpine as base Os setup nginx setup php-fpm ...
Tara Prasad Gurung's user avatar
5 votes
1 answer
622 views

Docker Images via Container vs Dockerfile

Pardon the dumb questions, but I've been learning about Docker and container technologies and I was learning about using Dockerfiles to specify build instructions for an image, and how each ...
Glenak1911's user avatar
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
1 vote
1 answer
2k views

How to start a service in fedora container without using systemd?

I want to start a service in my fedora docker container. But since systemd is not working in the fedora container. I am unable to start the service. I'm getting following error. Failed to connect ...
Buvanesh Kumar's user avatar
33 votes
3 answers
8k views

Understanding Docker layers

We have the following block in our Dockerfile: RUN yum -y update RUN yum -y install epel-release RUN yum -y groupinstall "Development Tools" RUN yum -y install python-pip git mysql-devel libxml2-...
alecxe's user avatar
  • 849
5 votes
2 answers
482 views

Make use of CIs as Maven Repository in order to use it for building Docker images without including dependencies

I am trying to make images from our company Maven based applications. These apps are using some libraries which are included in a Maven repository, but fills a lot of disk space. They also have some ...
Zeinab Abbasimazar's user avatar
0 votes
1 answer
3k views

How to make custom SLES (SuSe Linux Enterprise) Dockerfiles?

To use a dockerized SLES, you need to use an official base image and run it on a SLES host. But this does not seem to work out of the box - what needs to be done to build a custom image? Dockerfile:...
Ta Mu's user avatar
  • 6,782
9 votes
1 answer
1k views

What is the difference between using brackets (`[` `]`) and just specifying the command in the CMD option in Dockerfiles?

Why does CMD ["mysqld"] result in: db_1 | 2017-05-14T16:34:11.829163Z 0 [Note] mysqld (mysqld 5.7.18) starting as process 1 ... db_1 | 2017-05-14T16:34:11.833159Z 0 [Note] InnoDB: PUNCH HOLE ...
030's user avatar
  • 13.2k
35 votes
4 answers
169k views

How to remove directories and files in another layer using Docker? [duplicate]

Why this question? The reason for posting this Q&A is that sometimes certain software is required to compile software in a docker image. Once compiled, these packages are superfluous and should ...
030's user avatar
  • 13.2k
3 votes
2 answers
138 views

Why can this ENV not be found when it is defined in one layer using a Dockerfile?

When the following Dockerfile: ENV A=123 \ B=$A RUN echo $B is run, it results in: Step 2/2 : RUN echo $B ---> Running in x ---> y Removing intermediate container z When two ENV ...
030's user avatar
  • 13.2k

1 2
3