Push image docker to dockerhub

$ sudo docker push skander.msalmi/alpine:latest

The push refers to repository [skander.msalmi/alpine]
Get "https://skander.msalmi/v2/": dial tcp: lookup skander.msalmi on no such host

and when i create a copy image and try to push it i got this error :
sudo docker push new-repo:1.0.0

The push refers to repository [docker.io/library/new-repo]
eba10608f629: Preparing
cc2447e1835a: Preparing
denied: requested access to the resource is denied

You need to ue your username as a prefix for your repository if you want to push it to Docker Hub. In the first case Docker interpreted skander.msalmi as a name of a registry. In the second case no prefix was defined, meaning that the registry should be Docker Hub and the owner is Docker Hub itself. This is how official images can be downloaded and your is not official of course.

This would have been worked probably:

sudo docker push skanderdocker10/alpine:latest

Of course, you need to add that tag to the image.

I edited your question. Please, format your posts according to the following guide: How to format your forum posts
In short: please, use </> button to share codes, terminal outputs, error messages or anything that can contain special characters which would be interpreted by the MarkDown filter. Use the preview feature to make sure your text is formatted as you would expect it and check your post after you have sent it so you can still fix it.