Skip to content

go-training/docker-demo

Repository files navigation

docker-demo

Dockerfile demo

How to login Docker Hub

docker login -u appleboy

create access token from Docker Hub

How to enable Docker BuildKit

export DOCKER_BUILDKIT=1

or update the /etc/docker/daemon.json file

{
  "features": {
    "buildkit": true
  }
}

restart docker daemon using root user

systemctl restart docker

Build

docker build -t demo .

Run

docker run -d -p 1234:8080 demo

Test

curl localhost:1234/ping