Skip to content

Instantly share code, notes, and snippets.

View 100daysofdevops's full-sized avatar
🎯
Focusing

100daysofdevops

🎯
Focusing
View GitHub Profile
resource "aws_route53_record" "sdlc-scm-route53-record" {
count = "${length(var.hostname)}"
name = "${element(var.hostname,count.index )}"
type = "A"
zone_id = "${var.zone_id}"
records = ["${element(var.arecord, count.index)}"]
ttl = "300"
}
$ docker container run -it alpine /bin/sh
/ #
$ docker container ls -a
CONTAINER ID IMAGE COMMAND CREATED
STATUS PORTS NAMES
a6e7f019a727 alpine "/bin/sh" 8 minutes ago
Exited (0) 8 minutes ago cool_swirles
e0cd40a8d6b6 alpine "ls -l" 21 minutes ago
Exited (0) 21 minutes ago frosty_nobel
ef57f217de51 hello-world "/hello" 40 minutes ago
Exited (0) 40 minutes ago tender_franklin
$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED
STATUS PORTS NAMES
$ docker container run alpine ls -l
total 8
drwxr-xr-x 2 root root 4096 Aug 20 10:30 bin
drwxr-xr-x 5 root root 340 Oct 5 03:12 dev
drwxr-xr-x 1 root root 66 Oct 5 03:12 etc
drwxr-xr-x 2 root root 6 Aug 20 10:30 home
drwxr-xr-x 5 root root 185 Aug 20 10:30 lib
drwxr-xr-x 5 root root 44 Aug 20 10:30 media
drwxr-xr-x 2 root root 6 Aug 20 10:30 mnt
drwxr-xr-x 2 root root 6 Aug 20 10:30 opt
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
alpine latest 961769676411 6 weeks ago 5.58MB
hello-world latest fce289e99eb9 9 months ago 1.84kB
$ docker image pull alpine
Using default tag: latest
latest: Pulling from library/alpine
9d48c3bd43c5: Pull complete
Digest: sha256:72c42ed48c3a2db31b7dafe17d275b634664a708d901ec9fd57b1529280f01fb
Status: Downloaded newer image for alpine:latest
docker.io/library/alpine:latest
$ docker container run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:b8ba256769a0ac28dd126d584e0a2011cd2877f3f76e093a7ae560f2a5301c00
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
package main
import "fmt"
func main() {
a := [...]int{1,2,3}
b := &a
b[1] = 4
fmt.Println(a)
fmt.Println(b)
package main
import "fmt"
func main() {
a := [...]int{1,2,3}
b := a
b[1] = 4
fmt.Println(a)
fmt.Println(b)