Use Docker Shell Alias on Linux

In order to use the Linux Shell to use the usual aliases such as Ll for ls -lh to use, you have to use the following trick:

Since the login via sh is not a Linux login shell, the alias definitions are /etc/profile.d not loaded at login.


Enough, deal with Sh –login in the container, then the alias definitions are available.

DockerFile PHP with XDebug and Amazon Linux 2

A DockerFile for a PHP 7.2. Environment with XDebug for a Symfony 4 Environment on Amazon Linux 2:

FROM amazonlinux:2.0.20190823.1

RUN yum install -y

# install php
RUN amazon-linux-extras install -y php7.2
RUN yum install -y php-devel.x86_64 php-xml.x86_64 php-pecl-zip.x86_64  php-intl.x86_64

#install xdebug
RUN yum install -y gcc make
RUN yum install -y php-pear.noarch
RUN pecl install xdebug
RUN echo 'zend_extension=/usr/lib64/php/modules/' >> /etc/php.ini

Docker Xdebug remote_host setzen in Toolbox für PHPStorm

To debug with Xdebug and PHPStorm in the Docker Container, but gets the error message:

Connection was not established. Probably '' is incorrect

this is due to the, that Docker in the Toolbox variant for Windows has the placeholder not filled. So the IP of the PHPStorm computer has to be set manually.

To do this, you manually set the value of xdebug.remote_host to (the IP Docker sets for the host, can varnise) cli interpreter options:


Docker Directory Mount on Windows 10 with Docker Toolbox

To place a local folder in a Docker Container on Windows 10 to mount, you can either use Docker for Windows or if you are using the Windows 10 Home Edition used, one is forced, This by hand with Virtual Box Do.

To do this, you have to use the Docker default Select Box in Virtual Box:


and add a new Shared Folder:virtual_box_shared_folder_add

Then you have to restart the docker-machine in the Docker Toolbox, this will restart the docker default Virtual Box:

docker-machine restart

Now you can mount your directory in his docker-compose.yml:

  - /htdocs/my_project:/var/www/html/

Now the folder in the Docker container is successfully mounted.

The following command can be used to test, whether the mount was successful:

docker exec -it CONTAINER_ID ls -ll /var/www/html

Docker – an introduction

Docker is a virtualization tool, with the operating system environments and there running software in containers can be packed up and can be run on non-operating system environments.

The advantages of docker:

- Containers can be exchanged very easily with docker, This helps with the work on joint projects, If infrastructure needs to be angeapsst, only on the dev environment, then on the test environment, etc. So can run test using the appropriate environment, It therefore has a dynamic test environment, instead of a static

- performance advantages compared to virtual machines

- the containers make it easier, the development environment for software projects all participants quick and easy to make. This will make easier the onboarding and dependencies are avoided, as e.g.. a development server, work on all, which may not be altered but

- impertinent so finally environment simulates also distributed systems in development and testing and testing. This can error be earlier found and avoids. Who does not know that, the production system consists of multiple nodes behind a load balancer with master/slave database, but the dev/test/staging system has only a node without slave.

- Plattformunabhaengikeit: You can run on his MAC Windows applications in the container without any problems

Docker consists of several components: more…

Project: baby

The just completed project baby deals with the issues relating to the development of the own child:

  • How great my child be in x years
  • My child is like in x years
  • Is my child too hard or too thin
  • What dress size is wear it when?

The Web page is to help parents find out, When you need to buy what dress size, the approaching winter/summer home to have the appropriate.

Parents can thus einschätzne, If the child is too thin or too thick for your age/size/weight ratio.

The following technologies were used for the realization:

Symfony 3, Docker, MySQL, PHP, GIT, Google material design, Amazon AWS

Elasticsearch 5 Cluster with docker example

With the docker-compose.yml can be quickly built up a container-based environment with docker. The memory values for the Java VM are customizable (512MB) and for the docker image (1GB).

Cluster with 2 Nodes to operate, can see the elasticsearch2 comment out.

version: '2'
    container_name: elasticsearch1
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
        soft: -1
        hard: -1
    mem_limit: 1g
      - esdata1:/usr/share/elasticsearch/data
      - 9200:9200
      - esnet
#  elasticsearch2:
#    image:
#    environment:
#      -
#      - bootstrap.memory_lock=true
#      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
#      - ""
#    ulimits:
#      memlock:
#        soft: -1
#        hard: -1
#    mem_limit: 1g
#    volumes:
#      - esdata2:/usr/share/elasticsearch/data
#    networks:
#      - esnet

    driver: local
#  esdata2:
#    driver: local


Docker 1.9: Error validating certificates

Error message:

Error running connection boilerplate: Error checking and/or regenerating the certs: There was an error validating certificates for host "": dial tcp i/o timeout You can attempt to regenerate them using 'docker-machine regenerate-certs name'. Be advised that this will trigger a Docker daemon restart which will stop running containers.

At the Fehlermledung, to new regenerate the TLS certificates, has helped me not, as recommended by others, Virtual box to update to the latest version, but only, the default image, to which docker himself erzegt generate together new certificates.

  1. For this opening virtual box and stop of the running virtual machine (default) for close -.> turn off
  2. Then it deletes the image in virtual box.
  3. Then you leave the image regenerate terminals with docker about running the docker