First we need to make a build directory:
Then we need to cd into our new directory and get our Dockerfile, for this example I will be using my modified wazuh-kibana-elastalert Dockerfile:
cd ~/docker-build wget https://gitea.trader418.me/trader418/wazuh-docker/raw/branch/master/kibana/Dockerfile
Now we build the Docker image. At the same time we are tagging our image, in this example I am tagging with the user/repository “yourUsername”, the image name “yourImageName” and the tag “latest”:
docker build -t yourUsername/yourImageName:latest .
Once this has completed, you should be able to see the newly built image using the following command:
Now we need to authenticate with the docker repository so we can push our new image:
docker login docker.io
At this point you should be prompted for your docker hub credentials.
Now we can push your new image to the docker repository:
docker push yourUsername/yourImageName:latest