gilbertoalbino / php74-fpm-docker

Ambiente Docker teste com PHP 7.4-fpm, Xdebug, Nginx e MySQL 8
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

build final docker_php-fpm image #2

Open StephanKrauss opened 4 years ago

StephanKrauss commented 4 years ago

Hello,

a simple question. I'm a beginner in docker. The php74-fpm-docker works fine. I have combined the running docker with PhpStorm for debugging. Now i have finished my work.

My question is: How is the best way to create my own php-fpm image. I will store this image in a image repository ( hub.docker.com ).

Is the command 'docker build' correct ?

Your sincerly

Stephan

gilbertoalbino commented 4 years ago

Hi, @StephanKrauss .

The process of creating your own images is pretty simple.

Once you have created you account on hub.docker.com, and have created a Dockerfile containing your setup, from your terminal you can:

docker build -t yourusername/project-name . 
docker login
docker tag yourusername/project-name yourusername/project-name:v1
docker push yourusername/project-name:v1

From now on you can reference it in others Dockerfile or composer.yml files as "yourusername/project-name:v1"

Hope have helped you!

StephanKrauss commented 4 years ago

Hello,

have I understood that correctly. With the command:

docker build -t yourusername / project-name.

Build an image with my scripts, php-fpm7.4 and a server? Sorry I'm a beginner in Docker.

Best regards

Stephan