first create Dockerfile second build 3 push on registry github or vultr
FROM nginx:latest
RUN echo "<h1>Hello</h1>" > /usr/share/nginx/html/index.html
image registry example:
- ghcr.io/juanpablocs/nginx:2.0.0
- sjc.vultrcr.com/chusan/nginx:2.0.0
docker buildx build --platform linux/amd64 -t [image:tag] -f Dockerfile .
in your localy or github actions
docker push [image:tag]
pull on the final server
docker pull [image:tag]
docker run -it --rm -d -p 80:80 --name web [image:tag] --restart always