can not push files to remote host

I have started a container (git service) using this command…

# Create local directory for volume.
$ mkdir -p /var/gogs

# Use `docker run` for the first time.
$ docker run --name=gogs -p 10022:22 -p 10080:3000 -v /var/gogs:/data gogs/gogs

I am able to start the git service and can check the newly created repository from browser…

  • docker pull lookup index.docker.io: no such host
  • Launching node docker container for debugging from VS Code
  • How to access to Google AppEngine Managed VM logs?
  • Jackrabbit with PostgreSQL backend leaves repository in inconsistent state
  • golang net.LookupHost in docker container return 127.0.53.53
  • Run Java command line from node.js dokku container
  • http://52.201.82.96:10080/shantanuo/testme

    But when I follow these steps, I get an error (permission denied):

    touch README.md
    git init
    git add README.md
    git commit -m "first commit"
    git remote add origin http://localhost:3000/shantanuo/testme.git
    git push -u origin master
    

    Is it a docker issue?

  • How can I use GPU in Docker image with Theano launched from Windows host?
  • Docker: listening in container, not answering outside
  • vagrant: Run shell script in Virtualbox after Docker instances boot (ordering is wrong)
  • Django channels and docker-compose error
  • Nodemon is not working in Docker environment
  • Docker unable to process Dockerfile
  • 2 Solutions collect form web for “can not push files to remote host”

    u should define the volume datapoint,
    e.g.

    mkdir -p /var/gogs
    VOLUME["/var/gogs"]
    

    Since the docker port 3000 is linked to 10080 of the host machine, use this…

    git remote add origin http://52.201.82.96:10080/shantanuo/testme.git
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.