Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions build3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM golang:1.8

ADD . /go/src/app

CMD ["go", "run", "/go/src/app/main.go"]

7 changes: 7 additions & 0 deletions build3/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "fmt"

func main() {
fmt.Println("Hello, world!")
}
4 changes: 2 additions & 2 deletions build5/curlcontainer2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu
FROM debian:stretch

RUN apt-get update && apt-get install -y \
RUN apt-get update -y && apt-get install -y \
curl \
pv \
iputils-ping \
Expand Down
4 changes: 2 additions & 2 deletions module2.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ In this exercise you will become familiar with the docker commit command which a
7. Type ```docker images``` and note that you now see two images one name harry with a tag of latest and another named harry with a tag of potter
8. Type ```docker run -ti --name harry harry:potter``` and type ```ls``` to note that the ron_was_here.txt file is in the new container
9. Type exit
10. Type ```docker rmi harry:potter```
11. Type ```docker rm harry```
10. Type ```docker rm harry```
11. Type ```docker rmi harry:potter```

Although this example is simple the idea here is to see how you take a container, add new configurations to it and make and image from it to be used in other containers. However, as useful as docker commit is ultimately you will most likely use it rarely and instead will favor the Dockerfile process to build your images. Using docker commit is typically a one time process where you have to create the first container to make the next image. A Dockerfile is a more consistent way to make repeatable images or new images with changes to the Dockerfile options.

Expand Down