{"id":332616,"date":"2022-04-29T15:01:07","date_gmt":"2022-04-29T15:01:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=332616"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=332616","title":{"rendered":"<span>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 LEMP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e docker \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0427\u0430\u0441\u0442\u044c \u0442\u0440\u0435\u0442\u044c\u044f: docker-compose, Dockerfile<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/548\/1ed\/61b\/5481ed61b449761601082c1352e13df3.png\" width=\"1280\" height=\"762\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/548\/1ed\/61b\/5481ed61b449761601082c1352e13df3.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0446\u0438\u043a\u043b \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432. \u0412 \u044d\u0442\u043e\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c Dockerfile, docker-compose \u0438 \u043a\u0430\u043a \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e docker. \u041e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0435\u0441\u044c \u043e\u043f\u044b\u0442\u043d\u044b\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u043c, \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043c\u0435\u043b\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b.<\/p>\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0438\u0437\u0432\u0430\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b, \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0432\u0441\u0435, \u0447\u0442\u043e \u0441 \u044d\u0442\u0438\u043c \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0442\u0435\u043c\u0430 \u0443\u0436\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u0430 \u0432 \u0441\u0435\u0442\u0438, \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u0449\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u044b \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u043d\u0443\u043b\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043e\u0442 \u043b\u044e\u0434\u0435\u0439, \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043d\u0430\u0448\u0435\u0439 \u0441\u0444\u0435\u0440\u043e\u0439. \u0426\u0435\u043b\u044c \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 &#8212; \u043b\u0438\u0448\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u043d\u044e\u0430\u043d\u0441\u044b \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0438 \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432 \u043e\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435.<\/p>\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b \u043a \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044e:<\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/661443\/\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 LEMP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e docker \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0427\u0430\u0441\u0442\u044c \u043f\u0435\u0440\u0432\u0430\u044f: \u0411\u0430\u0437\u0430<\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/662698\/\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 LEMP-c\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e docker \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0427\u0430\u0441\u0442\u044c \u0432\u0442\u043e\u0440\u0430\u044f: docker-compose<\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/645451\/\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 LEMP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0441\u0430\u043c\u044b\u0445 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445. \u0427\u0430\u0441\u0442\u044c \u043f\u0435\u0440\u0432\u0430\u044f<\/a>.<\/p>\n<ol>\n<li>\n<p>DockerFile<\/p>\n<ul>\n<li>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043b\u043e\u0438 Dockerfile.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c Dockerfile. <\/p>\n<\/li>\n<li>\n<p>Dockerfile php8.1-fpm.<\/p>\n<ul>\n<li>\n<p>\u041f\u0443\u043d\u043a\u0442 1. C\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0443\u043d\u043a\u0442 2 \u0438 3. \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u041a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f Dockerfile.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0443\u043d\u043a\u0442 4. \u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432 Dockerfile.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Dockerfile mysql \u0438 nginx.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a docker-compose.<\/p>\n<\/li>\n<\/ol>\n<h2>DockerFile<\/h2>\n<p><strong>Dockerfile<\/strong> &#8212; \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0441\u0431\u043e\u0440\u043a\u0435 \u043e\u0431\u0440\u0430\u0437\u0430. \u0412 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.\u00a0<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440: \u0421\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437 php8.1-fpm \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 libgeoip-dev, libmemcached-dev \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 geoip, mcrypt, memcached.<\/p>\n<h4>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/h4>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438 \u043f\u0438\u0448\u0435\u0442\u0441\u044f Dockerfile:<\/p>\n<ol>\n<li>\n<p>FROM &#8212; \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u0438\u0437 DockerHub.<br \/>\u041f\u0440\u0438\u043c\u0435\u0440: <code>FROM PHP:7.4-cli<\/code><\/p>\n<\/li>\n<li>\n<p>ENV &#8212; \u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<br \/>\u041f\u0440\u0438\u043c\u0435\u0440: <code>ENV DOMAIN=DOMAIN_NAME.com<\/code><br \/>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 $DOMAIN \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f DOMAIN_NAME.com.<br \/>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0434\u043a\u043e. \u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0435 env \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c \u0432 docker-compose.yml.<\/p>\n<\/li>\n<li>\n<p>COPY &#8212; \u041a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u0430. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0430\u0434\u0440\u0435\u0441 \u0444\u0430\u0439\u043b\u0430\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 \u0445\u043e\u0441\u0442\u0435, \u0434\u0430\u043b\u0435\u0435 \u0430\u0434\u0440\u0435\u0441 \u0430\u0434\u0440\u0435\u0441 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435.<br \/>\u041f\u0440\u0438\u043c\u0435\u0440: <code>COPY docker-entrypoint.sh \/<\/code><\/p>\n<\/li>\n<li>\n<p>EXPOSE &#8212; \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u0440\u0442 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0434\u043a\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0435 \u043f\u043e\u0440\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0432 docker-compose.yml.<br \/>\u041f\u0440\u0438\u043c\u0435\u0440: <code>EXPOSE 8080<\/code><\/p>\n<\/li>\n<li>\n<p>RUN &#8212; \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442, \u0447\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u0438\u0434\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430.<br \/>\u041f\u0440\u0438\u043c\u0435\u0440: <code>RUN apt-get update<\/code><\/p>\n<\/li>\n<li>\n<p>WORKDIR &#8212; \u0440\u0430\u0431\u043e\u0447\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f. \u0412 \u0434\u0430\u043d\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u043f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e. <br \/>\u041f\u0440\u0438\u043c\u0435\u0440: <code>WORKDIR \/var\/www<\/code><\/p>\n<\/li>\n<li>\n<p>CMD &#8212; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u0412 Dockerfile \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0432\u044b\u0437\u043e\u0432 CMD.<br \/>\u041f\u0440\u0438\u043c\u0435\u0440: \u0414\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 php-fpm \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0447\u0442\u043e\u0431 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b php-fpm. \u0415\u0441\u043b\u0438 php-fpm \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439.<br \/><code>CMD\u00a0 [\"php-fpm\"]<\/code><\/p>\n<\/li>\n<li>\n<p>ENTRYPOINT &#8212; \u0430\u043d\u0430\u043b\u043e\u0433 CMD. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435. \u0414\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441 CMD.<br \/>\u041f\u0440\u0438\u043c\u0435\u0440: <code>ENTRYPOINT [\"\/docker-entrypoint.sh\"]<\/code><br \/>\u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f docker-entrypoint.sh.<\/p>\n<\/li>\n<\/ol>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043d\u0438\u0445 \u0432 <a href=\"https:\/\/docs.docker.com\/engine\/reference\/builder\/\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0430\u043d\u0443\u0430\u043b\u0435.<\/a> <\/p>\n<h4>\u0421\u043b\u043e\u0438 Dockerfile.<\/h4>\n<p>\u041a\u0430\u043a \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0441\u043b\u043e\u0438?<\/p>\n<p>Docker \u0431\u0435\u0440\u0435\u0442 \u043e\u0431\u0440\u0430\u0437 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043d\u0435\u0433\u043e \u0441\u043b\u043e\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 Dockerfile.<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0438\u0440\u043e\u0433 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u043b\u043e\u0435\u0432. \u0412\u0441\u0435 \u044d\u0442\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u0440\u0430\u0437, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/17d\/a86\/3d1\/17da863d1c10f1e819c35973bfdce2e7.png\" width=\"271\" height=\"501\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/17d\/a86\/3d1\/17da863d1c10f1e819c35973bfdce2e7.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440: \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 curl \u0438 sendmail.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u0442\u043e\u0440\u0442\u0438\u043a:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/62e\/fe7\/2b2\/62efe72b2d966cc8e0966e3a0bcc7de1.png\" width=\"271\" height=\"431\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/62e\/fe7\/2b2\/62efe72b2d966cc8e0966e3a0bcc7de1.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0430\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043a\u043e\u043c\u0430\u043d\u0434. Docker \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u0441\u043b\u043e\u0439. \u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043b\u043e\u0435\u0432 \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u0438\u0442\u044c \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437, \u0438 \u0442\u0435\u043c \u0434\u043e\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0438 Dockerfile. \u0418\u043d\u0430\u0447\u0435 \u0432\u043c\u0435\u0441\u0442\u043e \u043c\u0438\u043d\u0438\u0430\u0442\u044e\u0440\u043d\u043e\u0433\u043e \u043c\u0438\u043b\u043e\u0433\u043e \u0442\u043e\u0440\u0442\u0438\u043a\u0430 \u043e\u043d \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u0432 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0442\u043e\u0440\u0442 \u0432\u0435\u0441\u043e\u0432 \u0432 3G \u0438 \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u0432 \u043f\u043e\u043b\u0447\u0430\u0441\u0430.<\/p>\n<p>\u0418 \u0432\u044b \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u201c\u042f \u043d\u0435\u0441\u0443 \u0442\u043e\u0440\u0442\u0438\u043a\u201d. \u041f\u043e\u043d\u0435\u0441\u0435\u0442\u0435 \u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/aad\/241\/a2a\/aad241a2ada70729fa6915f8570a43b4.png\" width=\"480\" height=\"360\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aad\/241\/a2a\/aad241a2ada70729fa6915f8570a43b4.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0438, \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 Dockerfile.<\/p>\n<h2>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c Dockerfile.<\/h2>\n<p>\u041a\u0430\u043a \u043f\u0438\u0441\u0430\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 Dockerfile? \u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0442\u0430\u043a\u0442\u0438\u043a\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a7e\/e6e\/f62\/a7ee6ef626dd8b7a7783af8759b7dc00.png\" width=\"1000\" height=\"652\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a7e\/e6e\/f62\/a7ee6ef626dd8b7a7783af8759b7dc00.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0430\u043a\u0442\u0438\u043a\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 \u043d\u0443\u0436\u043d\u044b\u0445 \u043d\u0430\u043c \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f Dockerfile.<\/p>\n<p>\u0422\u0430\u043a\u0442\u0438\u043a\u0430:<\/p>\n<ol>\n<li>\n<p>C\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u041a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f Dockerfile.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432 Dockerfile.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n<\/li>\n<\/ol>\n<h2>Dockerfile php8.1-fpm.<\/h2>\n<h4>\u041f\u0443\u043d\u043a\u0442 1. C\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/h4>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043d\u0430\u043c \u043f\u0430\u043a\u0435\u0442\u044b, \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043c\u043e\u0434\u0443\u043b\u0438 \u043d\u0443\u0436\u043d\u044b \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b. \u041c\u044b \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0433\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e. \u0412 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u043c\u044b \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c php-fpm \u043f\u043e\u0434 wordpress, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0435\u0440\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0434\u043b\u044f php, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f wordpress. \u0421 <a href=\"https:\/\/make.wordpress.org\/hosting\/handbook\/server-environment\/#php-extensions\">\u043e\u0444\u0444.\u0441\u0430\u0439\u0442<\/a>.<\/p>\n<p>\u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u043c\u043e\u0434\u0443\u043b\u0438:<\/p>\n<p><code>exif,\u00a0 imagick,\u00a0 openssl,\u00a0 zip, bcmath, filter, gd,\u00a0 intl, curl, dom, fileinfo, hash, mbstring, xml, iconv, simplexml, sodium, xmlreader, zlib,\u00a0 pcre.<\/code><\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0432 \u043e\u0431\u0440\u0430\u0437\u0435 php8.1-fpm.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0431\u043e\u0440 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0438\u0437 1 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<pre><code>docker run -d php:8.1.5-fpm<\/code><\/pre>\n<pre><code>docker run -d php:8.1.5-fpm Unable to find image 'php:8.1.5-fpm' locally 8.1.5-fpm: Pulling from library\/php 1fe172e4850f: Pull complete 012a3732d045: Pull complete 43092314d50d: Pull complete 4f615e42d863: Pull complete f896b94fc405: Pull complete 86b8a98f8d70: Pull complete 71729f2ef2b8: Pull complete b2cfcdf44abb: Pull complete 2440531c13bc: Pull complete 6e794559acbe: Pull complete Digest: sha256:26d0e7a636a4fa140e5958110b6458fd0667a4a24069f0c60aca0d38df6d66ad Status: Downloaded newer image for php:8.1.5-fpm 3ebf3e9aadb5be40fa10160979fc0a6524307e5078804323b3337b9bdf5d92b6<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<\/p>\n<pre><code>docker ps CONTAINER ID \u00a0 IMAGE \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 COMMAND\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 CREATED \u00a0 \u00a0 \u00a0 \u00a0 STATUS \u00a0 \u00a0 \u00a0 \u00a0 PORTS\u00a0 \u00a0 \u00a0 NAMES 3ebf3e9aadb5 \u00a0 php:8.1.5-fpm \u00a0 \"docker-php-entrypoi\u2026\" \u00a0 5 seconds ago \u00a0 Up 2 seconds \u00a0 9000\/tcp \u00a0 pensive_cray<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438:<\/p>\n<pre><code>docker exec -it pensive_cray bash @:\/var\/www\/html#<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438:<\/p>\n<pre><code>@:\/var\/www\/html# php -m [PHP Modules] Core ctype curl date dom fileinfo filter ftp hash iconv json libxml mbstring mysqlnd openssl pcre PDO pdo_sqlite Phar posix readline Reflection session SimpleXML sodium SPL sqlite3 standard tokenizer xml xmlreader xmlwriter zlib [Zend Modules]<\/code><\/pre>\n<p>\u0412 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043d\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u0435\u0439:<\/p>\n<p><code>exif,\u00a0 imagick,\u00a0 openssl,\u00a0 zip, bcmath, filter, gd,\u00a0 intl, mcrypt<\/code><\/p>\n<p>\u0423\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435:<\/p>\n<p><code>curl, dom, fileinfo, hash, mbstring, xml, iconv, simplexml, sodium, xmlreader, zlib,\u00a0 pcre.<\/code><\/p>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 exif, imagick, openssl, zip, bcmath, filter, gd,\u00a0 intl, mcrypt. \u0418\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<\/p>\n<h4>\u041f\u0443\u043d\u043a\u0442 2 \u0438 3. \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u041a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f Dockerfile.<\/h4>\n<p>\u0412 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445 php \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<ol>\n<li>\n<p>docker-php-ext-install &#8212; \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p>docker-php-ext-configure &#8212; \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p>docker-php-ext-enable &#8212; \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p>pecl install &#8212; \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e pecl.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u044d\u0442\u043e exif. \u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438:<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c:<\/p>\n<pre><code>docker-php-ext-install exif<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430:<\/p>\n<pre><code>:\/var\/www\/html# docker-php-ext-install exif Configuring for: PHP Api Version: \u00a0 \u00a0 \u00a0 \u00a0 20210902 Zend Module Api No:\u00a0 \u00a0 \u00a0 20210902 Zend Extension Api No: \u00a0 420210902 checking for grep that handles long lines and -e... \/bin\/grep checking for egrep... \/bin\/grep -E checking for a sed that does not truncate output... \/bin\/sed checking for pkg-config... \/usr\/bin\/pkg-config checking pkg-config is at least version 0.9.0... yes checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<\/p>\n<pre><code>:\/var\/www\/html# php -m | grep exif exif<\/code><\/pre>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d!<\/p>\n<p>\u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432 Dockerfile.<\/p>\n<pre><code>RUN docker-php-ext-install exif<\/code><\/pre>\n<p>\u041b\u0430\u0439\u0444\u0445\u0430\u043a: \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u0442\u0435 \u0432 Dockerfile. \u041a\u042d\u041f time!!!<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0443 \u044d\u0442\u043e imagick.<\/p>\n<p>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c:<\/p>\n<pre><code>docker-php-ext-install imagick<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n<pre><code>\/var\/www\/html# docker-php-ext-install imagick error: \/usr\/src\/php\/ext\/imagick does not exist<\/code><\/pre>\n<p>\u041d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 imagick. \u041c\u043e\u0434\u0443\u043b\u044f \u043d\u0435\u0442.\u00a0<\/p>\n<p>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e pecl:<\/p>\n<pre><code>pecl install imagick downloading imagick-3.7.0.tgz ... Starting to download imagick-3.7.0.tgz (360,138 bytes) .........................................................................done: 360,138 bytes 33 source files, building running: phpize Configuring for: PHP Api Version: \u00a0 \u00a0 \u00a0 \u00a0 20210902 Zend Module Api No:\u00a0 \u00a0 \u00a0 20210902 Zend Extension Api No: \u00a0 420210902 Please provide the prefix of ImageMagick installation [autodetect] : building in \/tmp\/pear\/temp\/pear-build-defaultuserDlaKao\/imagick-3.7.0 running: \/tmp\/pear\/temp\/imagick\/configure --with-php-config=\/usr\/local\/bin\/php-config --with-imagick checking for grep that handles long lines and -e... \/bin\/grep checking for egrep... \/bin\/grep -E checking for a sed that does not truncate output... \/bin\/sed checking for pkg-config... \/usr\/bin\/pkg-config checking pkg-config is at least version 0.9.0... yes checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking for system library directory... lib checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu checking for PHP prefix... \/usr\/local checking for PHP includes... -I\/usr\/local\/include\/php -I\/usr\/local\/include\/php\/main -I\/usr\/local\/include\/php\/TSRM -I\/usr\/local\/include\/php\/Zend -I\/usr\/local\/include\/php\/ext -I\/usr\/local\/include\/php\/ext\/date\/lib checking for PHP extension directory... \/usr\/local\/lib\/php\/extensions\/no-debug-non-zts-20210902 checking for PHP installed headers prefix... \/usr\/local\/include\/php checking if debug is enabled... no checking if zts is enabled... no checking for gawk... no checking for nawk... nawk checking if nawk is broken... no checking whether to enable the imagick extension... yes, shared checking for pkg-config... \/usr\/bin\/pkg-config checking ImageMagick MagickWand API configuration program... checking Testing \/usr\/local\/bin\/MagickWand-config... Doesn't exist checking Testing \/usr\/bin\/MagickWand-config... Doesn't exist checking Testing \/usr\/sbin\/bin\/MagickWand-config... Doesn't exist checking Testing \/opt\/bin\/MagickWand-config... Doesn't exist checking Testing \/opt\/local\/bin\/MagickWand-config... Doesn't exist checking Testing \/opt\/homebrew\/bin\/MagickWand-config... Doesn't exist configure: error: not found. Please provide a path to MagickWand-config or Wand-config program. ERROR: `\/tmp\/pear\/temp\/imagick\/configure --with-php-config=\/usr\/local\/bin\/php-config --with-imagick' failed<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n<pre><code>ERROR: `\/tmp\/pear\/temp\/imagick\/configure --with-php-config=\/usr\/local\/bin\/php-config --with-imagick' failed<\/code><\/pre>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u0432 \u0434\u0435\u0431\u0440\u044f\u0445 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043e\u0442\u0432\u0435\u0442, \u0447\u0442\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a libmagickwand-dev \u0438 libmagickcore-dev.<\/p>\n<p>\u0421\u0442\u0430\u0432\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440:<\/p>\n<pre><code>apt-get install libmagickwand-dev libmagickcore-dev -y<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u043f\u044f\u0442\u044c:<\/p>\n<pre><code>pecl install imagick<\/code><\/pre>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d.<\/p>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e:<\/p>\n<pre><code>docker-php-ext-enable imagick<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<\/p>\n<pre><code>:\/var\/www\/html# php -m | grep imagick imagick<\/code><\/pre>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d!<\/p>\n<p>\u0412 \u043d\u0430\u0448 Dockerfile \u0438\u0434\u0443\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code>RUN apt-get install libmagickwand-dev libmagickcore-dev -y RUN pecl install imagick RUN docker-php-ext-enable imagick<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043f\u0440\u043e\u0431 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0430\u043a\u0438\u0435 RUN:<\/p>\n<p>\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435! \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u0438, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0441\u0432\u0435\u0440\u0438\u0442\u044c \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<\/p>\n<details class=\"spoiler\">\n<summary>Dockerfile RUN \u0441\u043f\u043e\u0439\u043b\u0435\u0440.<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>RUN docker-php-ext-install exif RUN apt-get install libmagickwand-dev libmagickcore-dev -y RUN pecl install imagick RUN docker-php-ext-enable imagick RUN PHP_OPENSSL=yes RUN docker-php-ext-install xml RUN docker-php-ext-install filter RUN apt-get install libzip-dev -y RUN docker-php-ext-install zip RUN docker-php-ext-install bcmath RUN apt install libwebp-dev RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp RUN docker-php-ext-install gd RUN docker-php-ext-install intl<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0441\u0435 RUN \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043d\u0430\u043c \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<p>\u041d\u0430\u0448\u0438 \u0441\u043b\u043e\u0438 \u0433\u043e\u0442\u043e\u0432\u044b. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u0438\u0448\u0435\u043d\u043a\u0443 \u043d\u0430 \u0442\u043e\u0440\u0442\u0435. \u042d\u0442\u043e FROM, WORKDIR \u0438 CMD.<\/p>\n<ol>\n<li>\n<p>FROM &#8212; \u043a\u0430\u043a\u043e\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u0431\u0440\u0430\u0442\u044c.<br \/><code>FROM php:8.1.5-fpm<\/code><\/p>\n<\/li>\n<li>\n<p>WORKDIR &#8212; \u0434\u043e\u043c\u0430\u0448\u043d\u044f\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f<br \/><code>WORKDIR \/var\/www<\/code><\/p>\n<\/li>\n<li>\n<p>CMD &#8212; \u0441\u0435\u0440\u0432\u0438\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u0443\u0448\u0435\u043d \u0432\u0441\u0435\u0433\u0434\u0430.<br \/>CMD [&#171;php-fpm\u201d]<\/p>\n<\/li>\n<\/ol>\n<h4>\u041f\u0443\u043d\u043a\u0442 4. \u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432 Dockerfile.<\/h4>\n<p>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440:<\/p>\n<pre><code>docker stop pensive_cray pensive_cray docker rm pensive_cray pensive_cray<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e Dockerfile php-fpm:<\/p>\n<pre><code>cd \/var\/apps\/domain_name\/volumes\/build\/php-fpm8.1<\/code><\/pre>\n<p>\u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432 Dockerfile php-fpm \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<pre><code>mcedit Dockerfile<\/code><\/pre>\n<pre><code>FROM php:8.1.5-fpm  WORKDIR \/var\/www  RUN apt update RUN docker-php-ext-install exif RUN apt-get install libmagickwand-dev libmagickcore-dev -y RUN pecl install imagick RUN docker-php-ext-enable imagick RUN PHP_OPENSSL=yes RUN docker-php-ext-install xml RUN docker-php-ext-install filter RUN apt-get install libzip-dev -y RUN docker-php-ext-install zip RUN docker-php-ext-install bcmath RUN apt install libwebp-dev RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp RUN docker-php-ext-install gd RUN docker-php-ext-install intl  CMD [\"php-fpm\"]<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043f\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u043c\u0443\u0441\u044f Dockerfile:<\/p>\n<pre><code>docker build -f (\u043f\u0443\u0442\u044c \u0434\u043e Dockerfile)<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f Dockerfile, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code>docker -d build .<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0430\u0441\u044c \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a, \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434 \u043d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u0438 \u0432\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e!<\/p>\n<pre><code>\/volumes\/build\/php-fpm# docker build . Sending build context to Docker daemon   2.56kB Step 1\/18 : FROM php:8.1.5-fpm  ---> 17bca48e4475 Step 2\/18 : WORKDIR \/var\/www  ---> Using cache  ---> e5df181ecab6 Step 3\/18 : RUN apt update  ---> Using cache  ---> 8b9514675b7d Step 4\/18 : RUN docker-php-ext-install exif  ---> Using cache  ---> 5558b4578bac Step 5\/18 : RUN apt-get install libmagickwand-dev libmagickcore-dev -y  ---> Using cache  ---> 3e4d8b2c9cf0 Step 6\/18 : RUN pecl install imagick  ---> Using cache  ---> 2d001d41b213 Step 7\/18 : RUN docker-php-ext-enable imagick  ---> Using cache  ---> a73532e75edd Step 8\/18 : RUN PHP_OPENSSL=yes  ---> Using cache  ---> b17d13a149c5 Step 9\/18 : RUN docker-php-ext-install xml  ---> Using cache  ---> 1e7762060ed7 Step 10\/18 : RUN docker-php-ext-install filter  ---> Using cache  ---> 361820f59b1c Step 11\/18 : RUN apt-get install libzip-dev -y  ---> Using cache  ---> 05dd631e40d2 Step 12\/18 : RUN docker-php-ext-install zip  ---> Using cache  ---> ce67e77753d0 Step 13\/18 : RUN docker-php-ext-install bcmath  ---> Using cache  ---> 931aa5e4650a Step 14\/18 : RUN apt install libwebp-dev  ---> Using cache  ---> 9bef1b459423 Step 15\/18 : RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp  ---> Using cache  ---> 184d8ee067a0 Step 16\/18 : RUN docker-php-ext-install gd  ---> Using cache  ---> 2fbc109397c0 Step 17\/18 : RUN docker-php-ext-install intl  ---> Using cache  ---> 23bb5f7f91ef Step 18\/18 : CMD [\"php-fpm\"]  ---> Using cache  ---> d74294bc6db6 Successfully built d74294bc6db6<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c Dockerfile, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0435\u0432. \u0421\u0435\u0439\u0447\u0430\u0441 \u0438\u0445 18!<\/p>\n<p>\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u042d\u0442\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u043c \u0436\u0438\u0437\u043d\u044c \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c.<\/p>\n<p>\u0411\u0435\u0440\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a:<\/p>\n<pre><code>RUN apt-get update RUN apt-get install libmagickwand-dev libmagickcore-dev -y RUN apt-get install libzip-dev -y RUN apt install libwebp-dev<\/code><\/pre>\n<p>\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043c \u0438\u0445 \u0432 \u043e\u0434\u0438\u043d \u0441\u043b\u043e\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0441\u043b\u0435\u0448\u0430 \\ (\u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443).<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c:<\/p>\n<pre><code>RUN apt-get update RUN apt-get install -y \\ \u00a0\u00a0\u00a0\u00a0libmagickwand-dev \\ \u00a0\u00a0\u00a0\u00a0libmagickcore-dev \\ \u00a0\u00a0\u00a0\u00a0libzip-dev \\ \u00a0\u00a0\u00a0\u00a0libwebp-dev<\/code><\/pre>\n<p>\u041e\u0431\u044a\u0435\u0434\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b apt-get update \u0438 apt-get install. \u0422\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c and (&amp;&amp;).<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f:<\/p>\n<pre><code>RUN apt-get update \\ \u00a0\u00a0\u00a0\u00a0&amp;&amp; apt-get install -y \\ \u00a0\u00a0\u00a0\u00a0libmagickwand-dev \\ \u00a0\u00a0\u00a0\u00a0libmagickcore-dev \\ \u00a0\u00a0\u00a0\u00a0libzip-dev \\ \u00a0\u00a0\u00a0\u00a0libwebp-dev<\/code><\/pre>\n<p>\u041c\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u043e\u0434\u0438\u043d \u0441\u043b\u043e\u0439. \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c, \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u043b\u0438 \u043f\u0430\u043a\u0435\u0442\u044b \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u044d\u0442\u043e\u0442 \u0441\u043b\u043e\u0439.<\/p>\n<p>\u041e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u043c\u043e\u0434\u0443\u043b\u0438. \u0423 \u043d\u0430\u0441 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code>RUN docker-php-ext-install exif RUN docker-php-ext-enable imagick RUN docker-php-ext-install xml RUN docker-php-ext-install filter RUN docker-php-ext-install zip RUN docker-php-ext-install bcmath RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp RUN docker-php-ext-install gd RUN docker-php-ext-install intl<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0438\u0445 \u0432 \u043e\u0434\u0438\u043d \u0441\u043b\u043e\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0441\u043b\u044d\u0448\u0430 \u0438 (\u0442.\u043a \u044d\u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u044b) and (&amp;&amp;).<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f:<\/p>\n<pre><code>RUN docker-php-ext-install exif \\ \u00a0&amp;&amp; pecl install imagick \\ \u00a0&amp;&amp; docker-php-ext-enable imagick \\ \u00a0&amp;&amp; PHP_OPENSSL=yes \\ \u00a0&amp;&amp; docker-php-ext-install xml \\ \u00a0&amp;&amp; docker-php-ext-install filter \\ \u00a0&amp;&amp; docker-php-ext-install zip \\ \u00a0&amp;&amp; docker-php-ext-install bcmath \\ \u00a0&amp;&amp; docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \\ \u00a0&amp;&amp; docker-php-ext-install gd \\ \u00a0&amp;&amp; docker-php-ext-install intl<\/code><\/pre>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c:<\/p>\n<pre><code>@php:\/var\/apps\/domain_name\/volumes\/build\/php-fpm# docker build . Sending build context to Docker daemon \u00a0 2.56kB Step 1\/5 : FROM php:8.1.5-fpm \u00a0---> 17bca48e4475 Step 2\/5 : WORKDIR \/var\/www \u00a0---> Using cache \u00a0---> e5df181ecab6 Step 3\/5 : RUN apt-get update \u00a0 \u00a0 &amp;&amp; apt-get install -y \u00a0 \u00a0 libmagickwand-dev \u00a0 \u00a0 libmagickcore-dev \u00a0 \u00a0 libzip-dev \u00a0 \u00a0 libwebp-dev \u00a0---> Using cache \u00a0---> 54389f22f55f Step 4\/5 : RUN docker-php-ext-install exif\u00a0 &amp;&amp; pecl install imagick\u00a0 &amp;&amp; docker-php-ext-enable imagick\u00a0 &amp;&amp; PHP_OPENSSL=yes\u00a0 &amp;&amp; docker-php-ext-install xml\u00a0 &amp;&amp; docker-php-ext-install filter\u00a0 &amp;&amp; docker-php-ext-install zip\u00a0 &amp;&amp; docker-php-ext-install bcmath\u00a0 &amp;&amp; docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp\u00a0 &amp;&amp; docker-php-ext-install gd\u00a0 &amp;&amp; docker-php-ext-install intl \u00a0---> Using cache \u00a0---> e54e458d6522 Step 5\/5 : CMD [\"php-fpm\"] \u00a0---> Using cache \u00a0---> 534c59afa067 Successfully built 534c59afa067<\/code><\/pre>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e 18 \u0441\u043b\u043e\u0435\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u0441\u0435\u0433\u043e 5. \u042d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442!<\/p>\n<p>Dockerfile \u0434\u043b\u044f php8.1-fpm \u0433\u043e\u0442\u043e\u0432.<\/p>\n<h2>Dockerfile mysql \u0438 nginx.<\/h2>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 Dockerfile, \u0432 mysql \u0438 nginx \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u043e\u0431\u0440\u0430\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0423 \u043d\u0430\u0441 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043c\u043e\u0434\u0443\u043b\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 Dockerfile \u0442\u043e\u043b\u044c\u043a\u043e FROM:<\/p>\n<p>mysql:<\/p>\n<pre><code>FROM mysql:latest<\/code><\/pre>\n<p>nginx:<\/p>\n<pre><code>FROM nginx:latest<\/code><\/pre>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a docker-compose.<\/h3>\n<p>\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 docker-compose, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u043d\u0430\u0442\u044c:<\/p>\n<ol>\n<li>\n<p>up &#8212; \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0441 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c.<br \/>docker-compose up<\/p>\n<\/li>\n<li>\n<p>-d &#8212; \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0431\u0435\u0437 \u0432\u044b\u0432\u043e\u0434\u0430 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c.<br \/>docker-compose up -d<\/p>\n<\/li>\n<li>\n<p>&#8212;force-recreate \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e docker-compose.yml \u0438 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043d\u043e\u0432\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 docker-compose.yml<br \/>docker-compose up -d \u2013-force-recreate<\/p>\n<\/li>\n<li>\n<p>&#8212;build \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 Dockerfile \u0438 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043d\u043e\u0432\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 Dockerfile \u0438 docker-compose.yml<br \/>docker-compose up -d \u2013-build<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0447\u0438\u0449\u0430\u0435\u043c \u0432\u0441\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u043e\u0431\u0440\u0430\u0437\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b docker system prune &#8212;volumes &#8212;all<\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 docker-compose \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u0433\u0434\u0435 \u043b\u0435\u0436\u0438\u0442 \u044d\u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 docker-compose.yml.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441 docker-compose.\u00a0<\/p>\n<pre><code>cd \/var\/app\/domain_name<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c:<\/p>\n<pre><code>docker-compose up -d<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u043c\u044b\u00a0 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u0430\u0432\u0435\u0442\u043d\u044b\u0435:<\/p>\n<pre><code>Starting php-fpm ... done Starting nginx \u00a0 ... done Starting mysql \u00a0 ... done<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<\/p>\n<pre><code># docker ps CONTAINER ID \u00a0 IMAGE \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 COMMAND\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 CREATED\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 STATUS\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 PORTS\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 NAMES 47d63fac8e4f \u00a0 domain_name_nginx \u00a0 \u00a0 \"\/docker-entrypoint.\u2026\" \u00a0 10 minutes ago \u00a0 Up 13 seconds \u00a0 0.0.0.0:80->80\/tcp, :::80->80\/tcp, 0.0.0.0:443->443\/tcp, :::443->443\/tcp \u00a0 DOMAIN_NAME-nginx 941e858869e4 \u00a0 domain_name_php-fpm \u00a0 \"docker-php-entrypoi\u2026\" \u00a0 10 minutes ago \u00a0 Up 13 seconds \u00a0 9000\/tcp, 0.0.0.0:9000->9010\/tcp, :::9000->9010\/tcp\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 DOMAIN_NAME-php-fpm ce54ddd5fdd1 \u00a0 domain_name_mysql \u00a0 \u00a0 \"docker-entrypoint.s\u2026\" \u00a0 10 minutes ago \u00a0 Up 4 seconds\u00a0 \u00a0 3306\/tcp, 33060\/tcp, 0.0.0.0:3310->3310\/tcp, :::3310->3310\/tcp \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 DOMAIN_NAME-mysql<\/code><\/pre>\n<p>\u0412\u0441\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442.<\/p>\n<p>\u0427\u0442\u043e, \u0435\u0441\u043b\u0438 \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441, \u0432\u0434\u0440\u0443\u0433, STATUS \u043d\u0435 UP?\u00a0<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code>STATUS Restarting (1) Less than a second ago<\/code><\/pre>\n<p>\u0417\u043d\u0430\u0447\u0438\u0442, \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0433\u0434\u0435 \u0442\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430.<\/p>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u043e\u0433\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430:<\/p>\n<pre><code>docker logs &lt;ID \u0438\u043b\u0438 NAMES \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430><\/code><\/pre>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u0438 \u0437\u0430\u043d\u043e\u0432\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c docker-compose.yml.<\/p>\n<pre><code>docker-compose restart<\/code><\/pre>\n<p>\u041d\u0430\u043c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0441 nginx \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 php-fpm. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b DOMAIN_NAME.conf \u043f\u043e \u043f\u0443\u0442\u0438 .\/volumes\/etc\/nginx\/sites-enabled\/DOMAIN_NAME.conf \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n<pre><code>server {  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0listen \u00a0 80;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0server_name DOMAIN_NAME.com;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0access_log \/var\/www\/DOMAIN_NAME\/log\/nginx\/access.log;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0error_log \/var\/www\/DOMAIN_NAME\/log\/nginx\/error.log;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0location ~ \/\\.(svn|git|hg) {  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0deny all;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0location ~* ^.+\\.(css|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|html|swf)$ {  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0root \/var\/www\/DOMAIN_NAME\/data;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0expires max;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0access_log \u00a0 off;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0root \/var\/www\/DOMAIN_NAME\/data;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0index index.php index.html index.htm;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0location ~ \\.php$ {  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0fastcgi_pass 172.16.1.5:9010;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0fastcgi_index index.php;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0include fastcgi_params;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}  }<\/code><\/pre>\n<p>\u0412 \/volumes\/etc\/php\/fpm.pool.d\/domain.conf<\/p>\n<p>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c id \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 id \u0433\u0440\u0443\u043f\u043f\u044b \u0438\u0437 \/etc\/passwd. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 1001 \u0438 1001.<\/p>\n<pre><code>\u00a0\u00a0\u00a0user = 1001\u00a0\u00a0 \u00a0\u00a0\u00a0group = 1001<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c:<\/p>\n<pre><code>docker-compose restart<\/code><\/pre>\n<p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 c \u043f\u043e\u043c\u043e\u0449\u044c\u044e docker ps!<\/p>\n<p>\u0412\u0441\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u044e\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0438 \u043a\u043e\u0434 \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 mysql.<\/p>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0411\u0414 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0439\u0442\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 mysql \u0438 \u0442\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0435\u043c \u043a\u043e\u0434 WordPress.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \/var\/www\/DOMAIN_NAME\/.<\/p>\n<pre><code>cd \/var\/www\/DOMAIN_NAME\/<\/code><\/pre>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c WordPress:<\/p>\n<pre><code>wget https:\/\/ru.wordpress.org\/latest-ru_RU.zip<\/code><\/pre>\n<p>\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c:<\/p>\n<pre><code>unzip latest-ru_RU.zip<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u0432\u0441\u0435 \u0438\u0437 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 wordpress\/ \u0432 data\/. \u041c\u043e\u0436\u043d\u043e \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e F6 \u0432 mc.<\/p>\n<p>\u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0438.<\/p>\n<pre><code>chown -R DOMAIN_NAME: \/var\/www\/DOMAIN_NAME\/<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0441\u0430\u0439\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/50c\/84e\/d60\/50c84ed60a2cd07d544360b97968497e.png\" width=\"1324\" height=\"724\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/50c\/84e\/d60\/50c84ed60a2cd07d544360b97968497e.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u044c ip \u0430\u0434\u0440\u0435\u0441 mysql, \u0438\u043c\u044f \u0411\u0414, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/afe\/e11\/2f4\/afee112f4587c25e5acaf441f9ac1f99.png\" width=\"773\" height=\"704\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/afe\/e11\/2f4\/afee112f4587c25e5acaf441f9ac1f99.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0418 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c!<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0441 \u0432\u0430\u043c\u0438 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c Dockerfile, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 docker-compose \u0438 \u043f\u043e\u0434\u043d\u044f\u043b\u0438 \u0432\u0441\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0414\u043b\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 docker-compose \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 Dockerfile, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0441\u043b\u0443\u0436\u0431\u044b \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. \u0412\u0435\u0434\u044c \u0442\u0435\u043e\u0440\u0438\u044f \u044d\u0442\u043e \u043e\u0434\u043d\u043e, \u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 &#8212; \u044d\u0442\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0435.\u00a0<\/p>\n<p>\u041c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0434\u043b\u044f LEMP-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0412\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u043a\u0443\u0434\u0430 \u0431\u044b \u043c\u044b \u043d\u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b, \u043e\u043d\u0438 \u0432\u0435\u0437\u0434\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e. \u0414\u0430\u043d\u043d\u044b\u0435 yml \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 gitlab), \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043d\u0430 \u043d\u043e\u0432\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0448\u044c\u044e git.\u00a0<\/p>\n<p>\u0412\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u043e Docker. \u041d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u0434\u043b\u044f \u0432\u0430\u0441 \u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439, \u0438 \u043e\u043d\u0430 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0441\u0442\u0430\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u043e\u043a\u0432\u0430\u043b\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u043c.\u00a0<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b &#8212; \u0437\u0430\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043c\u044b \u0441 \u0440\u0430\u0434\u043e\u0441\u0442\u044c\u044e \u043d\u0430 \u043d\u0438\u0445 \u043e\u0442\u0432\u0435\u0442\u0438\u043c. \u0412\u0441\u0435\u043c \u0443\u0434\u0430\u0447\u043d\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0447\u0442\u043e\u0431 \u0432\u0430\u0448 PROD \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0430\u0434\u0430\u043b!<\/p>\n<p>P.S: \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c\u0438  <strong>Ansible<\/strong>. \u0410 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c playbook \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 LEMP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 docker. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043b\u0430\u0439\u043a\u0438 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0430\u0441.<br \/>\u0411\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c-\u043a\u0430\u043d\u0430\u043b\u0435 <a href=\"https:\/\/t.me\/devops_fm\">DevOps FM<\/a>.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/663512\/\"> https:\/\/habr.com\/ru\/company\/nixys\/blog\/663512\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0446\u0438\u043a\u043b \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432. \u0412 \u044d\u0442\u043e\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c Dockerfile, docker-compose \u0438 \u043a\u0430\u043a \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e docker. \u041e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0435\u0441\u044c \u043e\u043f\u044b\u0442\u043d\u044b\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u043c, \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043c\u0435\u043b\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b.<\/p>\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0438\u0437\u0432\u0430\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b, \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0432\u0441\u0435, \u0447\u0442\u043e \u0441 \u044d\u0442\u0438\u043c \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0442\u0435\u043c\u0430 \u0443\u0436\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u0430 \u0432 \u0441\u0435\u0442\u0438, \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u0449\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u044b \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u043d\u0443\u043b\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043e\u0442 \u043b\u044e\u0434\u0435\u0439, \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043d\u0430\u0448\u0435\u0439 \u0441\u0444\u0435\u0440\u043e\u0439. \u0426\u0435\u043b\u044c \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 &#8212; \u043b\u0438\u0448\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u043d\u044e\u0430\u043d\u0441\u044b \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0438 \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432 \u043e\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435.<\/p>\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b \u043a \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044e:<\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/661443\/\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 LEMP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e docker \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0427\u0430\u0441\u0442\u044c \u043f\u0435\u0440\u0432\u0430\u044f: \u0411\u0430\u0437\u0430<\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/662698\/\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 LEMP-c\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e docker \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0427\u0430\u0441\u0442\u044c \u0432\u0442\u043e\u0440\u0430\u044f: docker-compose<\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/nixys\/blog\/645451\/\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 LEMP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0441\u0430\u043c\u044b\u0445 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445. \u0427\u0430\u0441\u0442\u044c \u043f\u0435\u0440\u0432\u0430\u044f<\/a>.<\/p>\n<ol>\n<li>\n<p>DockerFile<\/p>\n<ul>\n<li>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043b\u043e\u0438 Dockerfile.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c Dockerfile. <\/p>\n<\/li>\n<li>\n<p>Dockerfile php8.1-fpm.<\/p>\n<ul>\n<li>\n<p>\u041f\u0443\u043d\u043a\u0442 1. C\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0443\u043d\u043a\u0442 2 \u0438 3. \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u041a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f Dockerfile.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0443\u043d\u043a\u0442 4. \u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432 Dockerfile.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Dockerfile mysql \u0438 nginx.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a docker-compose.<\/p>\n<\/li>\n<\/ol>\n<h2>DockerFile<\/h2>\n<p><strong>Dockerfile<\/strong> &#8212; \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0441\u0431\u043e\u0440\u043a\u0435 \u043e\u0431\u0440\u0430\u0437\u0430. \u0412 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.\u00a0<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440: \u0421\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437 php8.1-fpm \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 libgeoip-dev, libmemcached-dev \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 geoip, mcrypt, memcached.<\/p>\n<h4>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/h4>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438 \u043f\u0438\u0448\u0435\u0442\u0441\u044f Dockerfile:<\/p>\n<ol>\n<li>\n<p>FROM &#8212; \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u0438\u0437 DockerHub.<br \/>\u041f\u0440\u0438\u043c\u0435\u0440: <code>FROM PHP:7.4-cli<\/code><\/p>\n<\/li>\n<li>\n<p>ENV &#8212; \u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<br \/>\u041f\u0440\u0438\u043c\u0435\u0440: <code>ENV DOMAIN=DOMAIN_NAME.com<\/code><br \/>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 $DOMAIN \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f DOMAIN_NAME.com.<br \/>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0434\u043a\u043e. \u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0435 env \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c \u0432 docker-compose.yml.<\/p>\n<\/li>\n<li>\n<p>COPY &#8212; \u041a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u0430. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0430\u0434\u0440\u0435\u0441 \u0444\u0430\u0439\u043b\u0430\/\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 \u0445\u043e\u0441\u0442\u0435, \u0434\u0430\u043b\u0435\u0435 \u0430\u0434\u0440\u0435\u0441 \u0430\u0434\u0440\u0435\u0441 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435.<br \/>\u041f\u0440\u0438\u043c\u0435\u0440: <code>COPY docker-entrypoint.sh \/<\/code><\/p>\n<\/li>\n<li>\n<p>EXPOSE &#8212; \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u0440\u0442 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0434\u043a\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0435 \u043f\u043e\u0440\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0432 docker-compose.yml.<br \/>\u041f\u0440\u0438\u043c\u0435\u0440: <code>EXPOSE 8080<\/code><\/p>\n<\/li>\n<li>\n<p>RUN &#8212; \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442, \u0447\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u0438\u0434\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430.<br \/>\u041f\u0440\u0438\u043c\u0435\u0440: <code>RUN apt-get update<\/code><\/p>\n<\/li>\n<li>\n<p>WORKDIR &#8212; \u0440\u0430\u0431\u043e\u0447\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f. \u0412 \u0434\u0430\u043d\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u043f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e. <br \/>\u041f\u0440\u0438\u043c\u0435\u0440: <code>WORKDIR \/var\/www<\/code><\/p>\n<\/li>\n<li>\n<p>CMD &#8212; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u0412 Dockerfile \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0432\u044b\u0437\u043e\u0432 CMD.<br \/>\u041f\u0440\u0438\u043c\u0435\u0440: \u0414\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 php-fpm \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0447\u0442\u043e\u0431 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b php-fpm. \u0415\u0441\u043b\u0438 php-fpm \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439.<br \/><code>CMD\u00a0 [\"php-fpm\"]<\/code><\/p>\n<\/li>\n<li>\n<p>ENTRYPOINT &#8212; \u0430\u043d\u0430\u043b\u043e\u0433 CMD. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435. \u0414\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441 CMD.<br \/>\u041f\u0440\u0438\u043c\u0435\u0440: <code>ENTRYPOINT [\"\/docker-entrypoint.sh\"]<\/code><br \/>\u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f docker-entrypoint.sh.<\/p>\n<\/li>\n<\/ol>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043d\u0438\u0445 \u0432 <a href=\"https:\/\/docs.docker.com\/engine\/reference\/builder\/\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0430\u043d\u0443\u0430\u043b\u0435.<\/a> <\/p>\n<h4>\u0421\u043b\u043e\u0438 Dockerfile.<\/h4>\n<p>\u041a\u0430\u043a \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0441\u043b\u043e\u0438?<\/p>\n<p>Docker \u0431\u0435\u0440\u0435\u0442 \u043e\u0431\u0440\u0430\u0437 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043d\u0435\u0433\u043e \u0441\u043b\u043e\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 Dockerfile.<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0438\u0440\u043e\u0433 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u043b\u043e\u0435\u0432. \u0412\u0441\u0435 \u044d\u0442\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u0440\u0430\u0437, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440: \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 curl \u0438 sendmail.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u0442\u043e\u0440\u0442\u0438\u043a:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0430\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043a\u043e\u043c\u0430\u043d\u0434. Docker \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u0441\u043b\u043e\u0439. \u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043b\u043e\u0435\u0432 \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u0438\u0442\u044c \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437, \u0438 \u0442\u0435\u043c \u0434\u043e\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0438 Dockerfile. \u0418\u043d\u0430\u0447\u0435 \u0432\u043c\u0435\u0441\u0442\u043e \u043c\u0438\u043d\u0438\u0430\u0442\u044e\u0440\u043d\u043e\u0433\u043e \u043c\u0438\u043b\u043e\u0433\u043e \u0442\u043e\u0440\u0442\u0438\u043a\u0430 \u043e\u043d \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u0432 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0442\u043e\u0440\u0442 \u0432\u0435\u0441\u043e\u0432 \u0432 3G \u0438 \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u0432 \u043f\u043e\u043b\u0447\u0430\u0441\u0430.<\/p>\n<p>\u0418 \u0432\u044b \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u201c\u042f \u043d\u0435\u0441\u0443 \u0442\u043e\u0440\u0442\u0438\u043a\u201d. \u041f\u043e\u043d\u0435\u0441\u0435\u0442\u0435 \u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d.<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0438, \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 Dockerfile.<\/p>\n<h2>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c Dockerfile.<\/h2>\n<p>\u041a\u0430\u043a \u043f\u0438\u0441\u0430\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 Dockerfile? \u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0442\u0430\u043a\u0442\u0438\u043a\u0430.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0430\u043a\u0442\u0438\u043a\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 \u043d\u0443\u0436\u043d\u044b\u0445 \u043d\u0430\u043c \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f Dockerfile.<\/p>\n<p>\u0422\u0430\u043a\u0442\u0438\u043a\u0430:<\/p>\n<ol>\n<li>\n<p>C\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u041a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f Dockerfile.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432 Dockerfile.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n<\/li>\n<\/ol>\n<h2>Dockerfile php8.1-fpm.<\/h2>\n<h4>\u041f\u0443\u043d\u043a\u0442 1. C\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/h4>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043d\u0430\u043c \u043f\u0430\u043a\u0435\u0442\u044b, \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043c\u043e\u0434\u0443\u043b\u0438 \u043d\u0443\u0436\u043d\u044b \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b. \u041c\u044b \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0433\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e. \u0412 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u043c\u044b \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c php-fpm \u043f\u043e\u0434 wordpress, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0435\u0440\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0434\u043b\u044f php, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f wordpress. \u0421 <a href=\"https:\/\/make.wordpress.org\/hosting\/handbook\/server-environment\/#php-extensions\">\u043e\u0444\u0444.\u0441\u0430\u0439\u0442<\/a>.<\/p>\n<p>\u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u043c\u043e\u0434\u0443\u043b\u0438:<\/p>\n<p><code>exif,\u00a0 imagick,\u00a0 openssl,\u00a0 zip, bcmath, filter, gd,\u00a0 intl, curl, dom, fileinfo, hash, mbstring, xml, iconv, simplexml, sodium, xmlreader, zlib,\u00a0 pcre.<\/code><\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0432 \u043e\u0431\u0440\u0430\u0437\u0435 php8.1-fpm.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0431\u043e\u0440 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0438\u0437 1 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<pre><code>docker run -d php:8.1.5-fpm<\/code><\/pre>\n<pre><code>docker run -d php:8.1.5-fpm Unable to find image 'php:8.1.5-fpm' locally 8.1.5-fpm: Pulling from library\/php 1fe172e4850f: Pull complete 012a3732d045: Pull complete 43092314d50d: Pull complete 4f615e42d863: Pull complete f896b94fc405: Pull complete 86b8a98f8d70: Pull complete 71729f2ef2b8: Pull complete b2cfcdf44abb: Pull complete 2440531c13bc: Pull complete 6e794559acbe: Pull complete Digest: sha256:26d0e7a636a4fa140e5958110b6458fd0667a4a24069f0c60aca0d38df6d66ad Status: Downloaded newer image for php:8.1.5-fpm 3ebf3e9aadb5be40fa10160979fc0a6524307e5078804323b3337b9bdf5d92b6<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<\/p>\n<pre><code>docker ps CONTAINER ID \u00a0 IMAGE \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 COMMAND\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 CREATED \u00a0 \u00a0 \u00a0 \u00a0 STATUS \u00a0 \u00a0 \u00a0 \u00a0 PORTS\u00a0 \u00a0 \u00a0 NAMES 3ebf3e9aadb5 \u00a0 php:8.1.5-fpm \u00a0 \"docker-php-entrypoi\u2026\" \u00a0 5 seconds ago \u00a0 Up 2 seconds \u00a0 9000\/tcp \u00a0 pensive_cray<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438:<\/p>\n<pre><code>docker exec -it pensive_cray bash @:\/var\/www\/html#<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438:<\/p>\n<pre><code>@:\/var\/www\/html# php -m [PHP Modules] Core ctype curl date dom fileinfo filter ftp hash iconv json libxml mbstring mysqlnd openssl pcre PDO pdo_sqlite Phar posix readline Reflection session SimpleXML sodium SPL sqlite3 standard tokenizer xml xmlreader xmlwriter zlib [Zend Modules]<\/code><\/pre>\n<p>\u0412 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043d\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u0435\u0439:<\/p>\n<p><code>exif,\u00a0 imagick,\u00a0 openssl,\u00a0 zip, bcmath, filter, gd,\u00a0 intl, mcrypt<\/code><\/p>\n<p>\u0423\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435:<\/p>\n<p><code>curl, dom, fileinfo, hash, mbstring, xml, iconv, simplexml, sodium, xmlreader, zlib,\u00a0 pcre.<\/code><\/p>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 exif, imagick, openssl, zip, bcmath, filter, gd,\u00a0 intl, mcrypt. \u0418\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<\/p>\n<h4>\u041f\u0443\u043d\u043a\u0442 2 \u0438 3. \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u041a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f Dockerfile.<\/h4>\n<p>\u0412 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445 php \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<ol>\n<li>\n<p>docker-php-ext-install &#8212; \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p>docker-php-ext-configure &#8212; \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p>docker-php-ext-enable &#8212; \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p>pecl install &#8212; \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e pecl.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u044d\u0442\u043e exif. \u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438:<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c:<\/p>\n<pre><code>docker-php-ext-install exif<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430:<\/p>\n<pre><code>:\/var\/www\/html# docker-php-ext-install exif Configuring for: PHP Api Version: \u00a0 \u00a0 \u00a0 \u00a0 20210902 Zend Module Api No:\u00a0 \u00a0 \u00a0 20210902 Zend Extension Api No: \u00a0 420210902 checking for grep that handles long lines and -e... \/bin\/grep checking for egrep... \/bin\/grep -E checking for a sed that does not truncate output... \/bin\/sed checking for pkg-config... \/usr\/bin\/pkg-config checking pkg-config is at least version 0.9.0... yes checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<\/p>\n<pre><code>:\/var\/www\/html# php -m | grep exif exif<\/code><\/pre>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d!<\/p>\n<p>\u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432 Dockerfile.<\/p>\n<pre><code>RUN docker-php-ext-install exif<\/code><\/pre>\n<p>\u041b\u0430\u0439\u0444\u0445\u0430\u043a: \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u0442\u0435 \u0432 Dockerfile. \u041a\u042d\u041f time!!!<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0443 \u044d\u0442\u043e imagick.<\/p>\n<p>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c:<\/p>\n<pre><code>docker-php-ext-install imagick<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n<pre><code>\/var\/www\/html# docker-php-ext-install imagick error: \/usr\/src\/php\/ext\/imagick does not exist<\/code><\/pre>\n<p>\u041d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 imagick. \u041c\u043e\u0434\u0443\u043b\u044f \u043d\u0435\u0442.\u00a0<\/p>\n<p>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e pecl:<\/p>\n<pre><code>pecl install imagick downloading imagick-3.7.0.tgz ... Starting to download imagick-3.7.0.tgz (360,138 bytes) .........................................................................done: 360,138 bytes 33 source files, building running: phpize Configuring for: PHP Api Version: \u00a0 \u00a0 \u00a0 \u00a0 20210902 Zend Module Api No:\u00a0 \u00a0 \u00a0 20210902 Zend Extension Api No: \u00a0 420210902 Please provide the prefix of ImageMagick installation [autodetect] : building in \/tmp\/pear\/temp\/pear-build-defaultuserDlaKao\/imagick-3.7.0 running: \/tmp\/pear\/temp\/imagick\/configure --with-php-config=\/usr\/local\/bin\/php-config --with-imagick checking for grep that handles long lines and -e... \/bin\/grep checking for egrep... \/bin\/grep -E checking for a sed that does not truncate output... \/bin\/sed checking for pkg-config... \/usr\/bin\/pkg-config checking pkg-config is at least version 0.9.0... yes checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking for system library directory... lib checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-332616","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/332616","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=332616"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/332616\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=332616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=332616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=332616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}