FineUI used for many years, recently out of FineUICore version has no time to try a docker, a few days ago to buy Tencent cloud server, a nuclear 2g, installed centos7.6, beginning mainly whole personal blog, in Tencent cloud installed pagoda, pagoda linux panel, web interface, a key management server linux, it is convenient, not linux foundation can play linux.
- Despite pagoda, or use SSH to log Tencent cloud centos it:
Successful login, if this show:
Description 22 port is not open, we need to open Tencent cloud security group
Edit, refuse to allow the change and save.
2, first ensure that root landing, not to switch to root, knock command uname -a, core edition:
Linux VM_0_6_centos 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
In fact, this is a wasted effort, we already know that this is Tencent cloud centos version 7.6, installed docker is no problem, centos6.5 no problem
3, the yum update to the latest package, if you advance to the centos update to the latest version python2.7 python3.8, so this time after yum update will go wrong, mistakes can refer to: https://www.cnblogs.com/ cx55887 / p / 10538748.html
Use the command:
yum update
4, install the required packages
yum install -y yum-utils device-mapper-persistent-data lvm2
Set yum source
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
5, view all versions of all warehouse docker, and select a specific version is installed
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Loaded plugins: fastestmirror, langpacks
Installed Packages
docker-ce.x86_64 3:19.03.4-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.3-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.2-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.1-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.0-3.el7 docker-ce-stable
docker-ce.x86_64 3:18.09.9-3.el7 docker-ce-stable
docker-ce.x86_64 3:18.09.8-3.el7 docker-ce-stable
docker-ce.x86_64 3:18.09.7-3.el7 docker-ce-stable
docker-ce.x86_64 3:18.09.6-3.el7 docker-ce-stable
docker-ce.x86_64 3:18.09.5-3.el7 docker-ce-stable
docker-ce.x86_64 3: 18.09.4-3.el7 docker this steady-
docker-ce.x86_64 3: 18.09.3-3.el7 docker this steady-
docker-ce.x86_64 3: 18.09.2-3 .el7 docker this steady-
docker-ce.x86_64 3: 18.09.1-3.el7 docker this steady-
docker-ce.x86_64 3: 18.09.0-3.el7 docker this steady-
docker-ce.x86_64 18.06.3.ce-3.el7 docker it-steady
docker-ce.x86_64 18.06.3.ce-3.el7 @ docker it-steady
docker-ce.x86_64 18.06.2.ce-3.el7 docker- this steady-
docker-ce.x86_64 18.06.1.ce-3.el7 docker this steady-
docker-ce.x86_64 18.06.0.ce-3.el7 docker this steady-
docker-ce.x86_64 18.03.1. ce-1.el7.centos docker this steady-
docker-ce.x86_64 18.03.0.ce-1.el7.centos docker this steady-
docker-ce.x86_64 17.12.1.ce-1.el7.centos docker -this-permanent
docker-ce.x86_64 17.12.0.ce-1.el7.centos docker this steady-
docker-ce.x86_64 17.09.1.ce-1.el7.centos docker this steady-
docker-ce.x86_64 17.09.0 .this-1.el7.centos docker this steady-
docker-ce.x86_64 17.06.2.ce-1.el7.centos docker this steady-
docker-ce.x86_64 17.06.1.ce-1.el7.centos docker this steady-
docker-ce.x86_64 17.06.0.ce-1.el7.centos docker this steady-
docker-ce.x86_64 17.03.3.ce-1.el7 docker this steady-
docker-ce.x86_64 17.03.2.ce-1.el7.centos docker this steady-
docker-ce.x86_64 17.03.1.ce-1.el7.centos docker this steady-
docker-ce.x86_64 17.03.0.ce-1. el7.centos docker this steady-
Available Packages
I chose the latest version, use the command to install docker:
yum install docker-ce-18.06.3.ce-3.el7
Wait for the installation is successful, then start docker, and set the boot:
systemctl start docker
systemctl enable docker
Verify that the installation was successful, the command line enter the command: docker version
[root@VM_0_6_centos ~]# docker version Client: Version: 18.06.3-ce API version: 1.38 Go version: go1.10.3 Git commit: d7080c1 Built: Wed Feb 20 02:26:51 2019 OS/Arch: linux/amd64 Experimental: false Server: Engine: Version: 18.06.3-ce API version: 1.38 (minimum version 1.12) Go version: go1.10.3 Git commit: d7080c1 Built: Wed Feb 20 02:28:17 2019 OS/Arch: linux/amd64 Experimental: false
6, FineUICore_Examples_RazorPages_v6.0.0 open source code, modify Dockerfile vs2019 automatically generated, the original generation of Dockerfile is not used, I tried, spread docker up, generating a mirror is not running, why do not know, is this Dockerfile:
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base WORKDIR /app EXPOSE 80 FROM microsoft/dotnet:2.1-sdk AS build WORKDIR /src COPY ["FineUICore.Examples.RazorPages/FineUICore.Examples.RazorPages.csproj", "FineUICore.Examples.RazorPages/"] RUN dotnet restore "FineUICore.Examples.RazorPages/FineUICore.Examples.RazorPages.csproj" COPY . . WORKDIR "/src/FineUICore.Examples.RazorPages" RUN dotnet build "FineUICore.Examples.RazorPages.csproj" -c Release -o /app FROM build AS publish RUN dotnet publish "FineUICore.Examples.RazorPages.csproj" -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . ENTRYPOINT ["dotnet", "FineUICore.Examples.RazorPages.dll"]
Modified to look like this:
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base ARG source WORKDIR /publish EXPOSE 80 COPY /. /publish ENTRYPOINT ["dotnet", "FineUICore.Examples.RazorPages.dll"]
But also to Dockerfile is copied to the output directory into: Always copy, ensure Dockerfile copied to the build directory
Then publish to a folder:
This release uploaded successfully publish the files to a folder inside the folder centos, centos I was at the root of the file to build a folder called publish, upload, they can use the pagoda install a ftp server, so long:
Set up the account password, to download a local ftp client, such as the free filezilla.exe, very easy to use, filezilla input ip, account password, upload files publish in
7, the upload is complete, or generate FineUICore Basic source mirroring docker, use the command:
docker build -t myfineui (Note: there is a space behind the last.).
Wait for generating success after success, to view the generated image
[root@VM_0_6_centos ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE myfineui latest 9535b05e8107 16 hours ago 337MB alibaba-vica-netcore latest 7190d859989b 16 hours ago 189MB microsoft/dotnet 2.1-aspnetcore-runtime 190467cc5405 2 weeks ago 253MB mcr.microsoft.com/dotnet/core/runtime 3.0-buster-slim b525e32f0752 2 weeks ago 189MB portainer/portainer latest 4cda95efb0e4 3 weeks ago 80.6MB
You can see myfineui has successfully generated
8, run this image myfineui:
docker run --name myfineui -d -p 8080:80 myfineui
This means that the mirror myfineui running, and running this new container called myfineui centos mirror (second), the container port 80, port 8080 is mapped to the cloud server centos. A mirror can run numerous containers, which interfere with each other, like the inside of the classes c #, numerous examples may be new.
Finally, the external network ip cloud server plus port, you can access FineUICore the basic version:
This article Special thanks to dog brother!