Last post Oct 26, 2018 06:59 AM by Sherry Chen
Oct 25, 2018 03:28 AM|born2win|LINK
I have published my asp.ent core 2.1 rest api and moved the files to a folder called MyAPI on AWS redhat linux which has all files along with docker file. used following syntax to build and run the project.
docker build -t "TestAPI:dockerfile" .
docker run --name Testapi -d -p 80:80 --network mynetwork MyTest-api
i am able to success. but next time i used the below command to stop and remove the already created docker container.
docker stop Testapi
docker rm Testapi
I used winscp to copy the latest published files to the folder MYAPI and the isseu what am facing was, wehn i publish newly with modified files, still the old file being reference in containter. i mean to say, i added /modified url in the asp.net core project
and publish and moved the files using winscp to the linux destination folder it doesn't reflects the new fiels. stilll reference the old files. any suggestion how to deploy the published files on AWS linux docker containter. please help me by giving sample
scritpt how to achieve this.
Oct 25, 2018 05:31 AM|AddWeb Solution|LINK
These are the steps
Step-1. Publishing .net core project in local system. where project is created.
Step-2. Move publishing build of .net core project folder to linux system.
Step-3. Click on published folder and open that folder -> click on open file in terminal.
Step-4. Below is command to run .net core project in linux machine.
Step-5. Command name - Dotnet projectname.dll EX. dotnet Webapp1.dll
Step-6. Open browser And Run localhost:5000 in browser. (By default 5000 port is used.)
Oct 25, 2018 02:53 PM|bruce (sqlwork.com)|LINK
you need delete and recreate (build) the image Testapi
Oct 25, 2018 02:58 PM|born2win|LINK
Thank u Bruce and if possible could you please share with me the shell script which does this
Oct 26, 2018 06:59 AM|Sherry Chen|LINK
Hi born2win ,
You could try the following usages about
docker image rm 'imageName/ID'
docker image prune
docker image build [OPTIONS] PATH | URL | -
Best Regards ,