-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Rough draft of first chapter * Consolidate image/container chapter * Saving work * Adding additional details to setup section * Saving work * saving work * Mark other containers chapters as draft * Update the dependencies * Marking images/containers container as draft... for now
- Loading branch information
1 parent
8d447d3
commit 5fe45a0
Showing
32 changed files
with
521 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Use Ubuntu as base image for container | ||
FROM ubuntu:23.04 | ||
|
||
# Install latest packages | ||
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \ | ||
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 | ||
ENV LANG en_US.utf8 | ||
|
||
|
||
# Copy local text file into container | ||
COPY message.txt message.txt | ||
|
||
# Print message from file | ||
ENTRYPOINT [ "cat", "message.txt" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
|
||
build: | ||
docker build . -t techsqauwks/ubuntu | ||
|
||
run: | ||
docker run -t techsqauwks/ubuntu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello from the ubuntu image container! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# A 'scratch' image is an empty base image. | ||
FROM scratch | ||
|
||
# Copy binary executable | ||
COPY hello hello | ||
|
||
# Run executable | ||
ENTRYPOINT [ "./hello" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
build: | ||
docker build . -t techsqauwks/scatch | ||
|
||
run: | ||
docker run -t techsqauwks/scatch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
This example demonstrates how to create a "hello world" images using the base image. | ||
|
||
To compile the binary to copy into the image. | ||
|
||
```sh | ||
GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o hello | ||
``` | ||
|
||
The example can be build via: | ||
|
||
```sh | ||
$ docker build . -t techsqauwks/scatch | ||
``` | ||
|
||
And run via: | ||
|
||
```sh | ||
$ docker run -t techsqauwks/scatch | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module techsquawks/scratch-container | ||
|
||
go 1.21.2 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package main | ||
|
||
import "fmt" | ||
|
||
func main() { | ||
fmt.Println("Hello world!") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM alpine:3.14 | ||
|
||
ENTRYPOINT [ "echo", "hello world!" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
build: | ||
@docker build . -t techsqauwks/hello-world | ||
|
||
run: | ||
@docker run -t techsqauwks/hello-world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## Build | ||
|
||
``` | ||
$ docker build . --tag techsquawks:hello-world | ||
``` | ||
|
||
## List image | ||
|
||
``` | ||
$ docker images | ||
``` | ||
|
||
## Execute | ||
|
||
``` | ||
$ docker run -t techsquawks:hello-world | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
--- | ||
title: Docker | ||
draft: true | ||
draft: false | ||
chapter: true | ||
weight: 4 | ||
--- | ||
|
||
# Docker | ||
|
||
Developing containerized applications | ||
Developing containerized applications within the Docker ecosystem. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: Bind Mounts | ||
draft: false | ||
chapter: false | ||
draft: true | ||
chapter: true | ||
weight: 11 | ||
--- | ||
--- |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.