{"id":315356,"date":"2020-12-22T21:00:32","date_gmt":"2020-12-22T21:00:32","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=315356"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=315356","title":{"rendered":"\u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Docker \u0432 Windows 10"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0432 Windows 10 \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 .NET \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0438\u0436\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0431\u044b\u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f 64-\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 2004 \u0438 \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 18362. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0432\u0435\u0440\u0441\u0438\u044e \u0438 \u043d\u043e\u043c\u0435\u0440 \u0441\u0431\u043e\u0440\u043a\u0438, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u0432 PowerShell \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>winver<\/code><\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/922\/725\/19f\/92272519f08d939ffcdf566cbfa6f6e6.png\" width=\"685\" height=\"390\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0438\u0436\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0439, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0438\u0434\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435<\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 WSL 2<\/h2>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Windows Subsystem for Linux (WSL). \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c PowerShell \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043f\u0435\u0440\u0432\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<pre><code>dism.exe \/online \/enable-feature \/featurename:VirtualMachinePlatform \/all \/norestart<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/869\/74d\/bca\/86974dbca4aa3c15bfe0b493b5283868.png\" width=\"1188\" height=\"486\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<pre><code>dism.exe \/online \/enable-feature \/featurename:VirtualMachinePlatform \/all \/norestart<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/690\/076\/d06\/690076d0643e776057639e646a9c61f8.png\" width=\"1188\" height=\"486\"><figcaption><\/figcaption><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443, \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 <code>shutdown -r -t 1<\/code><\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c <a href=\"http:\/\/aka.ms\/wsl2kernelmsix64\" rel=\"noopener noreferrer nofollow\">\u043f\u0430\u043a\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u044f\u0434\u0440\u0430 Linux<\/a><\/p>\n<p>\u0412\u044b\u0431\u0435\u0440\u0435\u043c WSL 2 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u043d\u043e\u0432\u044b\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u0432 Linux <code>wsl --set-default-version 2<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/588\/afc\/2b6\/588afc2b6cdd45b96fe576c1c06535b4.png\" width=\"1188\" height=\"486\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u0446\u0435\u043b\u0435\u0439 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 Linux \u0447\u0435\u0440\u0435\u0437 Microsoft Store, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/www.microsoft.com\/store\/productId\/9N6SVWS3RX71\" rel=\"noopener noreferrer nofollow\">Ubuntu 20.04 LTS<\/a><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/24e\/2e0\/1f2\/24e2e01f2ad1d837cdca4fcfcd71e5b2.png\" width=\"1202\" height=\"950\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 \u0432\u0432\u0435\u0434\u0435\u043c \u0438\u043c\u044f \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\/getpro\/habr\/upload_files\/373\/d34\/8e7\/373d348e70e6d5224802b38bfbd4b4cf.png\" width=\"1183\" height=\"934\"><figcaption><\/figcaption><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u044b Linux, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0432 PowerShell \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>wsl --list --verbose<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2fb\/f26\/959\/2fbf26959d96c009b28619c2dab6dc27.png\" width=\"1188\" height=\"486\"><figcaption><\/figcaption><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 Linux, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>wsl --terminate Ubuntu-20.04<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/12a\/ed7\/913\/12aed79133672838c9e42198db1d75a4.png\" width=\"1188\" height=\"486\"><figcaption><\/figcaption><\/figure>\n<p>\u0424\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 Linux \u0431\u0443\u0434\u0435\u0442 \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 <code>\\\\wsl$<\/code><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/windows\/wsl\/about\" rel=\"noopener noreferrer nofollow\">\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0435 WSL<\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/windows\/wsl\/install-win10\" rel=\"noopener noreferrer nofollow\">\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0431 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b WSL \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u043f\u043e\u043b\u0430\u0434\u043e\u043a<\/a><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Docker<\/h2>\n<p>\u0421\u043a\u0430\u0447\u0430\u0435\u043c <a href=\"https:\/\/hub.docker.com\/editions\/community\/docker-ce-desktop-windows\" rel=\"noopener noreferrer nofollow\">Docker Desktop<\/a> \u0434\u043b\u044f Windows \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c, \u0441\u043b\u0435\u0434\u0443\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fe9\/d9c\/126\/fe9d9c1262128f83fa720d8a39d86e32.png\" width=\"908\" height=\"584\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Docker Desktop \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e Docker \u0441 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u043c Linux (WSL 2)<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4ae\/ea7\/bc0\/4aeea7bc02277c7717a990fe0bf836e7.png\" width=\"1250\" height=\"720\"><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b Docker \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a \u0447\u0435\u0440\u0435\u0437 PowerShell, \u0442\u0430\u043a \u0438 \u0447\u0435\u0440\u0435\u0437 Bash. \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>docker version<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d70\/1d9\/88c\/d701d988cac2590df0a16bc279707cc5.png\" width=\"1918\" height=\"1030\"><figcaption><\/figcaption><\/figure>\n<p><a href=\"https:\/\/docs.docker.com\/docker-for-windows\" rel=\"noopener noreferrer nofollow\">\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e Docker Desktop<\/a><\/p>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e Docker \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 <a href=\"https:\/\/hub.docker.com\/_\/busybox\" rel=\"noopener noreferrer nofollow\">busybox<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442 \u0441\u0432\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435<\/p>\n<pre><code>docker run busybox echo \"hello docker!!!\"<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2d7\/f1f\/e34\/2d7f1fe343b6d88e0f659474fbc26d36.png\" width=\"1268\" height=\"486\"><figcaption><\/figcaption><\/figure>\n<p>\u0425\u043e\u0440\u043e\u0448\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 <a href=\"https:\/\/hub.docker.com\/_\/rabbitmq\" rel=\"noopener noreferrer nofollow\">rabbitmq<\/a><\/p>\n<pre><code>docker run --name rabbit1 -p 8080:15672 -p 5672:5672 rabbitmq:3.8.9-management<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fb7\/164\/b63\/fb7164b6371be20f2f2a760e6611a372.png\" width=\"1268\" height=\"486\"><figcaption><\/figcaption><\/figure>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p><code>docker run<\/code> &#8212; \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0438\u0437 \u043e\u0431\u0440\u0430\u0437\u0430. \u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e, \u0442\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<a href=\"https:\/\/hub.docker.com\/\" rel=\"noopener noreferrer nofollow\"> Docker Hub<\/a><\/p>\n<p><code>--name rabbit1<\/code> &#8212; \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u043e\u043c\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443 \u0438\u043c\u044f rabbit1<\/p>\n<p><code>-p 8080:15672<\/code> &#8212; \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0440\u0442 \u0441 \u0445\u043e\u0441\u0442\u0430 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. 8080 &#8212; \u043f\u043e\u0440\u0442 \u043d\u0430 \u0445\u043e\u0441\u0442\u0435, 15672 &#8212; \u043f\u043e\u0440\u0442 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435<\/p>\n<p><code>rabbitmq:3.8.9-management<\/code> &#8212; \u0438\u043c\u044f \u043e\u0431\u0440\u0430\u0437\u0430 \u0438 \u0435\u0433\u043e \u0442\u0435\u0433\/\u0432\u0435\u0440\u0441\u0438\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435\u043c<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u0432\u043d\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c RabbitMQ \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0440\u0442 5672 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0440\u0442 8080<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ec2\/a99\/e91\/ec2a99e917ca083dcf38f5cfa3abe6e9.png\" width=\"1358\" height=\"838\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445, \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434 <code>docker container ls --all<\/code> \u0438\u043b\u0438 <code>docker ps -a<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c4c\/754\/536\/c4c7545368b90394844f7add718eaeaa.png\" width=\"1703\" height=\"312\"><figcaption><\/figcaption><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0448 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440: <code>docker stop rabbit1<\/code>. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u043d\u043e\u0432\u044c: <code>docker start rabbit1<\/code><\/p>\n<p><a href=\"https:\/\/docs.docker.com\/network\/bridge\" rel=\"noopener noreferrer nofollow\">\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 Docker<\/a><\/p>\n<h2>\u041e\u0442\u043b\u0430\u0434\u043a\u0430 .NET \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c, \u0442.\u043a. \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0446\u0435\u043b\u044b\u0445 \u0434\u0432\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0432\u0441\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0441\u0435\u0442\u044c \u0441 \u0438\u043c\u0435\u043d\u0435\u043c bridge, \u043d\u043e \u0442.\u043a. \u0432 \u0441\u0432\u043e\u0435\u0439 \u0441\u0435\u0442\u0438 \u043c\u044b \u0431\u0435\u0437 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441\u043c\u043e\u0436\u0435\u0448\u044c \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043f\u0440\u044f\u043c\u043e \u043f\u043e \u0438\u043c\u0435\u043d\u0438, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0435\u0442\u044c \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c mynet \u0442\u0438\u043f\u0430 <a href=\"https:\/\/docs.docker.com\/network\/bridge\" rel=\"noopener noreferrer nofollow\">bridge<\/a><\/p>\n<pre><code>docker network create mynet<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/68b\/cfe\/6cf\/68bcfe6cfe75a65b7458455c5600c500.png\" width=\"1268\" height=\"486\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c <a href=\"https:\/\/hub.docker.com\/_\/redis\" rel=\"noopener noreferrer nofollow\">redis<\/a> \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e \u043a \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 <code>-d<\/code> \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0432 \u0444\u043e\u043d\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435<\/p>\n<pre><code>docker run --name redis1 --network mynet -d redis<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dec\/632\/bda\/dec632bdae8933528928f506b5733f32.png\" width=\"1268\" height=\"486\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Visual Studio 2019 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 ASP.NET Core Web API, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0438<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/297\/8d3\/43f\/2978d343fb831b05961fe9220fa02433.png\" width=\"1536\" height=\"1065\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Redis \u043f\u0430\u043a\u0435\u0442 <a href=\"https:\/\/github.com\/StackExchange\/StackExchange.Redis\" rel=\"noopener noreferrer nofollow\">StackExchange.Redis<\/a> \u0447\u0435\u0440\u0435\u0437 Package Manager Console<\/p>\n<pre><code>Install-Package StackExchange.Redis -Version 2.2.4<\/code><\/pre>\n<p>\u041c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0430\u043a\u0446\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043a\u0440\u0430\u0441\u043e\u0442\u0435 \u0434\u0438\u0437\u0430\u0439\u043d\u0430, \u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0444\u0430\u0439\u043b RandomWeatherService.cs, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043b\u0443\u0436\u0431\u0430 \u0434\u043b\u044f \u0432\u044b\u0434\u0430\u0447\u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430<\/p>\n<pre><code>using System;  namespace WebApiFromDocker {     public class RandomWeatherService     {         private Random _randomGenerator;          public RandomWeatherService()         {             _randomGenerator = new Random();         }          public int GetForecast(string city)         {             var length = city.Length;             var temperatureC = _randomGenerator.Next(-length, length);             return temperatureC;         }     } }<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u0430\u0439\u043b RedisRepository.cs, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043b\u0443\u0436\u0431\u0430 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u043e\u0432<\/p>\n<pre><code>using StackExchange.Redis; using System; using System.Threading.Tasks;  namespace WebApiFromDocker {     public class RedisRepository     {         private string _connectionString = \"redis1:6379\";         private TimeSpan _expiry = TimeSpan.FromHours(1);          public async Task SetValue(string key, string value)         {             using var connection = await ConnectionMultiplexer             \t.ConnectAsync(_connectionString);             var db = connection.GetDatabase();             await db.StringSetAsync(key.ToUpper(), value, _expiry);         }          public async Task&lt;string&gt; GetValue(string key)         {             using var connection = await ConnectionMultiplexer             \t.ConnectAsync(_connectionString);             var db = connection.GetDatabase();             var redisValue = await db.StringGetAsync(key.ToUpper());             return redisValue;         }     } }<\/code><\/pre>\n<p>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043b\u0443\u0436\u0431\u044b \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 Startup<\/p>\n<pre><code>public void ConfigureServices(IServiceCollection services) {     services.AddScoped&lt;RandomWeatherService&gt;();     services.AddScoped&lt;RedisRepository&gt;();     services.AddControllers(); }<\/code><\/pre>\n<p>\u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 WeatherForecastController \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/p>\n<pre><code>using Microsoft.AspNetCore.Mvc; using System; using System.Threading.Tasks;  namespace WebApiFromDocker.Controllers {     [ApiController]     [Route(\"api\/[controller]\")]     public class WeatherForecastController : ControllerBase     {         private RandomWeatherService _weather;         private RedisRepository _cache;          public WeatherForecastController(             RandomWeatherService weather,              RedisRepository cache)         {             _weather = weather;             _cache = cache;         }          \/\/GET \/api\/weatherforecast\/moscow         [HttpGet(\"{city}\")]         public async Task&lt;WeatherForecast&gt; GetAsync(string city)         {             int temperatureC;             var cachedTemperatureCString = await _cache.GetValue(city);              if (!string.IsNullOrEmpty(cachedTemperatureCString))             {                 temperatureC = Convert.ToInt32(cachedTemperatureCString);             }             else             {                 temperatureC = _weather.GetForecast(city);                 await _cache.SetValue(city, temperatureC.ToString());             }              var forecast = new WeatherForecast(             \tcity, DateTime.UtcNow, temperatureC);             return forecast;         }     } }<\/code><\/pre>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0444\u0430\u0439\u043b Dockerfile \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438 \u0434\u043b\u044f Docker. \u041e\u0441\u0442\u0430\u0432\u0438\u043c \u0435\u0433\u043e \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439<\/p>\n<pre><code>FROM mcr.microsoft.com\/dotnet\/aspnet:5.0-buster-slim AS base WORKDIR \/app EXPOSE 80  FROM mcr.microsoft.com\/dotnet\/sdk:5.0-buster-slim AS build WORKDIR \/src COPY [\"WebApiFromDocker\/WebApiFromDocker.csproj\", \"WebApiFromDocker\/\"] RUN dotnet restore \"WebApiFromDocker\/WebApiFromDocker.csproj\" COPY . . WORKDIR \"\/src\/WebApiFromDocker\" RUN dotnet build \"WebApiFromDocker.csproj\" -c Release -o \/app\/build  FROM build AS publish RUN dotnet publish \"WebApiFromDocker.csproj\" -c Release -o \/app\/publish  FROM base AS final WORKDIR \/app COPY --from=publish \/app\/publish . ENTRYPOINT [\"dotnet\", \"WebApiFromDocker.dll\"]<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/p>\n<figure class=\"float bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fdb\/3de\/765\/fdb3de7651e97cf7d6e3861949cd3b47.PNG\" width=\"666\" height=\"599\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0412\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438, \u0442\u043e \u043e\u043d\u0438 <a href=\"https:\/\/bitbucket.org\/Sasha654\/webapifromdocker\/src\/master\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043f\u043e\u0434 \u043e\u0442\u043b\u0430\u0434\u043a\u043e\u0439<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3b5\/02c\/f66\/3b502cf66c70c31712b91bef22827aae.PNG\" width=\"999\" height=\"410\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d, \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e \u043a \u0441\u0435\u0442\u0438 mynet<\/p>\n<pre><code>docker network connect mynet WebApiFromDocker<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/10c\/c41\/09a\/10cc4109afea08d32cab600aeae9b6ab.png\" width=\"1402\" height=\"486\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0442\u0438<\/p>\n<pre><code>docker network inspect mynet<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/23e\/b87\/87b\/23eb8787bd5b6a282652d2c2edd09731.png\" width=\"1268\" height=\"1080\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Breakpoint \u0432 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0438 \u043f\u043e\u0448\u043b\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/www.postman.com\" rel=\"noopener noreferrer nofollow\">Postman<\/a>, \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043b\u044e\u0431\u043e\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440<\/p>\n<pre><code>http:\/\/localhost:49156\/api\/weatherforecast\/moscow <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a39\/a48\/186\/a39a4818638e8094c316841e0b5f0c05.png\" width=\"1031\" height=\"889\"><figcaption><\/figcaption><\/figure>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043f\u043e\u0440\u0442 \u0432 \u0412\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043e\u043a\u043d\u0435 Containers<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/66c\/bb3\/58e\/66cbb358efab06ff8ac6fad5c703387b.PNG\" width=\"924\" height=\"454\"><figcaption><\/figcaption><\/figure>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u043e\u043a\u043d\u0435 Postman<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a5b\/857\/71f\/a5b85771fd54d176dd48002136fcd741.png\" width=\"1465\" height=\"811\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0432 redis, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0432\u0448\u0438\u0441\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u0438 redis-cli<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b52\/13a\/265\/b5213a2655c92b7e333c09d8cf3ddb55.png\" width=\"1268\" height=\"486\"><figcaption><\/figcaption><\/figure>\n<p>\u0425\u043e\u0440\u043e\u0448\u043e, \u0432\u0441\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043a\u0430\u043a \u0438 \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u043e!<\/p>\n<\/div>\n<p> \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\/post\/534504\/\"> https:\/\/habr.com\/ru\/post\/534504\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0432 Windows 10 \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 .NET \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0438\u0436\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0431\u044b\u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f 64-\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 2004 \u0438 \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 18362. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0432\u0435\u0440\u0441\u0438\u044e \u0438 \u043d\u043e\u043c\u0435\u0440 \u0441\u0431\u043e\u0440\u043a\u0438, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u0432 PowerShell \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>winver<\/code><\/p>\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0438\u0436\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0439, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0438\u0434\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435<\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 WSL 2<\/h2>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Windows Subsystem for Linux (WSL). \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c PowerShell \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043f\u0435\u0440\u0432\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<pre><code>dism.exe \/online \/enable-feature \/featurename:VirtualMachinePlatform \/all \/norestart<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<pre><code>dism.exe \/online \/enable-feature \/featurename:VirtualMachinePlatform \/all \/norestart<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443, \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 <code>shutdown -r -t 1<\/code><\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c <a href=\"http:\/\/aka.ms\/wsl2kernelmsix64\" rel=\"noopener noreferrer nofollow\">\u043f\u0430\u043a\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u044f\u0434\u0440\u0430 Linux<\/a><\/p>\n<p>\u0412\u044b\u0431\u0435\u0440\u0435\u043c WSL 2 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u043d\u043e\u0432\u044b\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u0432 Linux <code>wsl --set-default-version 2<\/code><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u0446\u0435\u043b\u0435\u0439 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 Linux \u0447\u0435\u0440\u0435\u0437 Microsoft Store, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/www.microsoft.com\/store\/productId\/9N6SVWS3RX71\" rel=\"noopener noreferrer nofollow\">Ubuntu 20.04 LTS<\/a><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 \u0432\u0432\u0435\u0434\u0435\u043c \u0438\u043c\u044f \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\"><figcaption><\/figcaption><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u044b Linux, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0432 PowerShell \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>wsl --list --verbose<\/code><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 Linux, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>wsl --terminate Ubuntu-20.04<\/code><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0424\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 Linux \u0431\u0443\u0434\u0435\u0442 \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 <code>\\\\wsl$<\/code><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/windows\/wsl\/about\" rel=\"noopener noreferrer nofollow\">\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0435 WSL<\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/windows\/wsl\/install-win10\" rel=\"noopener noreferrer nofollow\">\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0431 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b WSL \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u043f\u043e\u043b\u0430\u0434\u043e\u043a<\/a><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Docker<\/h2>\n<p>\u0421\u043a\u0430\u0447\u0430\u0435\u043c <a href=\"https:\/\/hub.docker.com\/editions\/community\/docker-ce-desktop-windows\" rel=\"noopener noreferrer nofollow\">Docker Desktop<\/a> \u0434\u043b\u044f Windows \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c, \u0441\u043b\u0435\u0434\u0443\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Docker Desktop \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e Docker \u0441 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u043c Linux (WSL 2)<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b Docker \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a \u0447\u0435\u0440\u0435\u0437 PowerShell, \u0442\u0430\u043a \u0438 \u0447\u0435\u0440\u0435\u0437 Bash. \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>docker version<\/code><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p><a href=\"https:\/\/docs.docker.com\/docker-for-windows\" rel=\"noopener noreferrer nofollow\">\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e Docker Desktop<\/a><\/p>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e Docker \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 <a href=\"https:\/\/hub.docker.com\/_\/busybox\" rel=\"noopener noreferrer nofollow\">busybox<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442 \u0441\u0432\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435<\/p>\n<pre><code>docker run busybox echo \"hello docker!!!\"<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0425\u043e\u0440\u043e\u0448\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 <a href=\"https:\/\/hub.docker.com\/_\/rabbitmq\" rel=\"noopener noreferrer nofollow\">rabbitmq<\/a><\/p>\n<pre><code>docker run --name rabbit1 -p 8080:15672 -p 5672:5672 rabbitmq:3.8.9-management<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p><code>docker run<\/code> &#8212; \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0438\u0437 \u043e\u0431\u0440\u0430\u0437\u0430. \u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e, \u0442\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<a href=\"https:\/\/hub.docker.com\/\" rel=\"noopener noreferrer nofollow\"> Docker Hub<\/a><\/p>\n<p><code>--name rabbit1<\/code> &#8212; \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u043e\u043c\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443 \u0438\u043c\u044f rabbit1<\/p>\n<p><code>-p 8080:15672<\/code> &#8212; \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0440\u0442 \u0441 \u0445\u043e\u0441\u0442\u0430 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. 8080 &#8212; \u043f\u043e\u0440\u0442 \u043d\u0430 \u0445\u043e\u0441\u0442\u0435, 15672 &#8212; \u043f\u043e\u0440\u0442 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435<\/p>\n<p><code>rabbitmq:3.8.9-management<\/code> &#8212; \u0438\u043c\u044f \u043e\u0431\u0440\u0430\u0437\u0430 \u0438 \u0435\u0433\u043e \u0442\u0435\u0433\/\u0432\u0435\u0440\u0441\u0438\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435\u043c<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u0432\u043d\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c RabbitMQ \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0440\u0442 5672 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0440\u0442 8080<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445, \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434 <code>docker container ls --all<\/code> \u0438\u043b\u0438 <code>docker ps -a<\/code><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0448 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440: <code>docker stop rabbit1<\/code>. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u043d\u043e\u0432\u044c: <code>docker start rabbit1<\/code><\/p>\n<p><a href=\"https:\/\/docs.docker.com\/network\/bridge\" rel=\"noopener noreferrer nofollow\">\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 Docker<\/a><\/p>\n<h2>\u041e\u0442\u043b\u0430\u0434\u043a\u0430 .NET \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c, \u0442.\u043a. \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0446\u0435\u043b\u044b\u0445 \u0434\u0432\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0432\u0441\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0441\u0435\u0442\u044c \u0441 \u0438\u043c\u0435\u043d\u0435\u043c bridge, \u043d\u043e \u0442.\u043a. \u0432 \u0441\u0432\u043e\u0435\u0439 \u0441\u0435\u0442\u0438 \u043c\u044b \u0431\u0435\u0437 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441\u043c\u043e\u0436\u0435\u0448\u044c \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043f\u0440\u044f\u043c\u043e \u043f\u043e \u0438\u043c\u0435\u043d\u0438, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0435\u0442\u044c \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c mynet \u0442\u0438\u043f\u0430 <a href=\"https:\/\/docs.docker.com\/network\/bridge\" rel=\"noopener noreferrer nofollow\">bridge<\/a><\/p>\n<pre><code>docker network create mynet<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c <a href=\"https:\/\/hub.docker.com\/_\/redis\" rel=\"noopener noreferrer nofollow\">redis<\/a> \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e \u043a \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 <code>-d<\/code> \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0432 \u0444\u043e\u043d\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435<\/p>\n<pre><code>docker run --name redis1 --network mynet -d redis<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Visual Studio 2019 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 ASP.NET Core Web API, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0438<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Redis \u043f\u0430\u043a\u0435\u0442 <a href=\"https:\/\/github.com\/StackExchange\/StackExchange.Redis\" rel=\"noopener noreferrer nofollow\">StackExchange.Redis<\/a> \u0447\u0435\u0440\u0435\u0437 Package Manager Console<\/p>\n<pre><code>Install-Package StackExchange.Redis -Version 2.2.4<\/code><\/pre>\n<p>\u041c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0430\u043a\u0446\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043a\u0440\u0430\u0441\u043e\u0442\u0435 \u0434\u0438\u0437\u0430\u0439\u043d\u0430, \u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0444\u0430\u0439\u043b RandomWeatherService.cs, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043b\u0443\u0436\u0431\u0430 \u0434\u043b\u044f \u0432\u044b\u0434\u0430\u0447\u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430<\/p>\n<pre><code>using System;  namespace WebApiFromDocker {     public class RandomWeatherService     {         private Random _randomGenerator;          public RandomWeatherService()         {             _randomGenerator = new Random();         }          public int GetForecast(string city)         {             var length = city.Length;             var temperatureC = _randomGenerator.Next(-length, length);             return temperatureC;         }     } }<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u0430\u0439\u043b RedisRepository.cs, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043b\u0443\u0436\u0431\u0430 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u043e\u0432<\/p>\n<pre><code>using StackExchange.Redis; using System; using System.Threading.Tasks;  namespace WebApiFromDocker {     public class RedisRepository     {         private string _connectionString = \"redis1:6379\";         private TimeSpan _expiry = TimeSpan.FromHours(1);          public async Task SetValue(string key, string value)         {             using var connection = await ConnectionMultiplexer             \t.ConnectAsync(_connectionString);             var db = connection.GetDatabase();             await db.StringSetAsync(key.ToUpper(), value, _expiry);         }          public async Task&lt;string&gt; GetValue(string key)         {             using var connection = await ConnectionMultiplexer             \t.ConnectAsync(_connectionString);             var db = connection.GetDatabase();             var redisValue = await db.StringGetAsync(key.ToUpper());             return redisValue;         }     } }<\/code><\/pre>\n<p>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043b\u0443\u0436\u0431\u044b \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 Startup<\/p>\n<pre><code>public void ConfigureServices(IServiceCollection services) {     services.AddScoped&lt;RandomWeatherService&gt;();     services.AddScoped&lt;RedisRepository&gt;();     services.AddControllers(); }<\/code><\/pre>\n<p>\u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 WeatherForecastController \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/p>\n<pre><code>using Microsoft.AspNetCore.Mvc; using System; using System.Threading.Tasks;  namespace WebApiFromDocker.Controllers {     [ApiController]     [Route(\"api\/[controller]\")]     public class WeatherForecastController : ControllerBase     {         private RandomWeatherService _weather;         private RedisRepository _cache;          public WeatherForecastController(             RandomWeatherService weather,              RedisRepository cache)         {             _weather = weather;             _cache = cache;         }          \/\/GET \/api\/weatherforecast\/moscow         [HttpGet(\"{city}\")]         public async Task&lt;WeatherForecast&gt; GetAsync(string city)         {             int temperatureC;             var cachedTemperatureCString = await _cache.GetValue(city);              if (!string.IsNullOrEmpty(cachedTemperatureCString))             {                 temperatureC = Convert.ToInt32(cachedTemperatureCString);             }             else             {                 temperatureC = _weather.GetForecast(city);                 await _cache.SetValue(city, temperatureC.ToString());             }              var forecast = new WeatherForecast(             \tcity, DateTime.UtcNow, temperatureC);             return forecast;         }     } }<\/code><\/pre>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0444\u0430\u0439\u043b Dockerfile \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438 \u0434\u043b\u044f Docker. \u041e\u0441\u0442\u0430\u0432\u0438\u043c \u0435\u0433\u043e \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439<\/p>\n<pre><code>FROM mcr.microsoft.com\/dotnet\/aspnet:5.0-buster-slim AS base WORKDIR \/app EXPOSE 80  FROM mcr.microsoft.com\/dotnet\/sdk:5.0-buster-slim AS build WORKDIR \/src COPY [\"WebApiFromDocker\/WebApiFromDocker.csproj\", \"WebApiFromDocker\/\"] RUN dotnet restore \"WebApiFromDocker\/WebApiFromDocker.csproj\" COPY . . WORKDIR \"\/src\/WebApiFromDocker\" RUN dotnet build \"WebApiFromDocker.csproj\" -c Release -o \/app\/build  FROM build AS publish RUN dotnet publish \"WebApiFromDocker.csproj\" -c Release -o \/app\/publish  FROM base AS final WORKDIR \/app COPY --from=publish \/app\/publish . ENTRYPOINT [\"dotnet\", \"WebApiFromDocker.dll\"]<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/p>\n<figure class=\"float bordered full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0412\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438, \u0442\u043e \u043e\u043d\u0438 <a href=\"https:\/\/bitbucket.org\/Sasha654\/webapifromdocker\/src\/master\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043f\u043e\u0434 \u043e\u0442\u043b\u0430\u0434\u043a\u043e\u0439<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d, \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e \u043a \u0441\u0435\u0442\u0438 mynet<\/p>\n<pre><code>docker network connect mynet WebApiFromDocker<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0442\u0438<\/p>\n<pre><code>docker network inspect mynet<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Breakpoint \u0432 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0438 \u043f\u043e\u0448\u043b\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/www.postman.com\" rel=\"noopener noreferrer nofollow\">Postman<\/a>, \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043b\u044e\u0431\u043e\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440<\/p>\n<pre><code>http:\/\/localhost:49156\/api\/weatherforecast\/moscow <\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043f\u043e\u0440\u0442 \u0432 \u0412\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043e\u043a\u043d\u0435 Containers<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u043e\u043a\u043d\u0435 Postman<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0432 redis, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0432\u0448\u0438\u0441\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u0438 redis-cli<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0425\u043e\u0440\u043e\u0448\u043e, \u0432\u0441\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043a\u0430\u043a \u0438 \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u043e!<\/p>\n<\/div>\n<p> \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\/post\/534504\/\"> https:\/\/habr.com\/ru\/post\/534504\/<\/a><br \/><\/br><\/br><\/p>\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-315356","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/315356","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=315356"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/315356\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=315356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=315356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=315356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}