Skip to content

Commit b72587f

Browse files
committed
doc: added docker push section
1 parent 6362bc3 commit b72587f

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This app is designed to run in different ways:
2626
### running the app
2727

2828
After installing, run the server using `python app.py`
29-
Access the running app in a browser at the URL written to the console (most likely [http://localhost:5000])
29+
Access the running app in a browser at the URL written to the console (most likely [http://localhost:5000](http://localhost:50000))
3030

3131
## 2. As a Docker container running on your machine
3232

@@ -35,7 +35,7 @@ Access the running app in a browser at the URL written to the console (most like
3535
3. run `docker build -t flask-hello-world:latest .` to build the docker image
3636
4. `docker images` list the local available images
3737
5. run `docker run --name flask_hello_world -d -p 8000:5000 --rm flask-hello-world:latest` to start the container
38-
6. Navigate to [http://localhost:8000] in a browser to see the results. If you want to share it with your local network devices navigate to http://[your-ip-address]:8000
38+
6. Navigate to [http://localhost:8000](http://localhost:8000) in a browser to see the results. If you want to share it with your local network devices navigate to *http://[your-ip-address]:8000*
3939

4040
## 3. As a Docker image published in Docker Hub
4141

@@ -64,3 +64,29 @@ To check the default organization and space to which you have access, go to <htt
6464
8. to explore how your app directories are structured `bx cf ssh flask-hello-world`
6565

6666
![ibm_cloud](/img/ibm_cloud.png)
67+
68+
## 5. Push a new image
69+
70+
Login to the docker.io using the access token
71+
72+
```bash
73+
docker login -u ahmnouira docker.io
74+
```
75+
76+
Build and tag
77+
78+
```bash
79+
docker build -t flask-hello-world:latest .
80+
```
81+
82+
Tag it as per the docker hub repository name
83+
84+
```bash
85+
docker tag flask-hello-world:latest ahmnouira/flask-hello-world:latest
86+
```
87+
88+
Push the a new image:
89+
90+
```bash
91+
docker image push ahmnouira/flask-hello-world:latest
92+
```

0 commit comments

Comments
 (0)