Skip to content

Commit 6cc61b0

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents beb0f3e + 64a6cbf commit 6cc61b0

33 files changed

+323
-246
lines changed

12factor/03_configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ In _config/connections.js_, we define the _mongo_ connection and use MONGO_URL e
1010
module.exports.connections = {
1111
mongo: {
1212
adapter: 'sails-mongo',
13-
url: process.env.MONGO_URL'
13+
url: 'process.env.MONGO_URL'
1414
}
1515
};
1616
```

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This repo contains [Docker](https://docker.com) labs and tutorials authored both by Docker, and by members of the community. We welcome contributions and want to grow the repo.
44

55
#### Docker tutorials:
6-
* [Docker for beginners] (beginner/readme.md)
6+
* [Docker for beginners](beginner/readme.md)
77
* [Docker Swarm Mode](swarm-mode/README.md)
88
* [Configuring developer tools and programming languages](developer-tools/README.md)
99
* Java
@@ -20,7 +20,7 @@ This repo contains [Docker](https://docker.com) labs and tutorials authored both
2020

2121
#### Community tutorials
2222
* [Docker Tutorials from the Community](https://github.com/docker/community/tree/master/Docker-Meetup-Content) - links to a different repository
23-
* [Advanced Docker orchestration workshop] (https://github.com/docker/labs/tree/master/Docker-Orchestration) - links to a different repository
23+
* [Advanced Docker orchestration workshop](https://github.com/docker/labs/tree/master/Docker-Orchestration) - links to a different repository
2424

2525
For more information on Docker, see the Official [Docker documentation](https://docs.docker.com).
2626

beginner/chapters/setup.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Getting all the tooling setup on your computer can be a daunting task, but getti
88

99
The *getting started* guide on Docker has detailed instructions for setting up Docker on [Mac](https://docs.docker.com/docker-for-mac/), [Linux](https://docs.docker.com/engine/installation/linux/) and [Windows](https://docs.docker.com/docker-for-windows/).
1010

11-
*If you're using Docker for Windows* make sure you have [shared your drive](https://docs.docker.com/docker-for-windows/#/shared-drives).
11+
*If you're using Docker for Windows* make sure you have [shared your drive](https://docs.docker.com/docker-for-windows/#shared-drives).
1212

1313
*Important note* If you're using an older version of Windows or MacOS you may need to use [Docker Machine](https://docs.docker.com/machine/overview/) instead.
1414

beginner/chapters/votingapp.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Creating service vote_worker
133133
Creating service vote_redis
134134
Creating service vote_db
135135
```
136-
to verify your stack has deployed, use `docker stack services`
136+
to verify your stack has deployed, use `docker stack services vote`
137137
```
138138
docker stack services vote
139139
ID NAME MODE REPLICAS IMAGE

beginner/chapters/webapps.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,11 @@ Here's a quick summary of the few basic commands we used in our Dockerfile.
459459
CMD ["/bin/bash", "echo", "Hello World"]
460460
```
461461

462-
* `EXPOSE` opens ports in your image to allow communication to the outside world when it runs in a container.
462+
* `EXPOSE` creates a hint for users of an image which ports provide services. It is included in the information which
463+
can be retrieved via `$ docker inspect <container-id>`.
464+
465+
>**Note:** The `EXPOSE` command does not actually make any ports accessible to the host! Instead, this requires
466+
publishing ports by means of the `-p` flag when using `$ docker run`.
463467

464468
* `PUSH` pushes your image to Docker Hub, or alternately to a [private registry](TODO: add URL)
465469

developer-tools/java-debugging/Eclipse-README.md

+18-3
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,28 @@ Try to log into the application. Look at the value for password in the Eclipse v
154154

155155
In this MVC application the UserController uses the findByLogin method in the UserServiceImpl class which uses the findByUsername method to retrieve the information from the database. It then checks to see if the password from the form matches the user password. Since the password from the login form is not scrambled using ROT13, it does not match the user password and you cannot log into the application.
156156

157-
To fix this, apply ROT13 to the password by adding
157+
To fix this, apply ROT13 to the password by adding an import near the top of the file
158158

159159
```
160-
import com.docker.UserSignup.utit.Rot13
160+
import com.docker.UserSignup.util.Rot13
161+
```
162+
163+
and replace the contents of `findByLogin` with
161164

162-
String passwd = Rot13.rot13(password);
163165
```
166+
public boolean findByLogin(String userName, String password) {
167+
User usr = userRepository.findByUserName(userName);
168+
169+
String passwd = Rot13.rot13(password);
170+
171+
if(usr != null && usr.getPassword().equals(passwd)) {
172+
return true;
173+
}
174+
175+
return false;
176+
}
177+
```
178+
164179
![](images/eclipse_debug_UserServiceImpl_code.png)
165180

166181
Set a breakpoint in UserServiceImpl on the findByLogin method. Log in again and look at the values for the breakpoint. The 'passwd' variable is `z0ol` which matches the password for the user moby.

developer-tools/java/chapters/appa-common-commands.adoc

+8-8
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ Here is the list of commonly used Docker commands:
1717
| Remove all images | `docker image rm $(docker image ls -aq)`
1818
2+^s| Containers
1919
| Run a container | `docker container run`
20-
| List of running containers | `docker container ps`
21-
| List of all containers | `docker container ps -a`
20+
| List of running containers | `docker container ls`
21+
| List of all containers | `docker container ls -a`
2222
| Stop a container | `docker container stop ${CID}`
23-
| Stop all running containers | `docker container stop $(docker container ps -q)`
24-
| List all exited containers with status 1 | `docker container ps -a --filter "exited=1"`
23+
| Stop all running containers | `docker container stop $(docker container ls -q)`
24+
| List all exited containers with status 1 | `docker container ls -a --filter "exited=1"`
2525
| Remove a container | `docker container rm ${CID}`
26-
| Remove container by a regular expression | `docker container ps -a \| grep wildfly \| awk '{print $1}' \| xargs docker container rm -f`
27-
| Remove all exited containers | `docker container rm -f $(docker container ps -a \| grep Exit \| awk '{ print $1 }')`
28-
| Remove all containers | `docker container rm $(docker container ps -aq)`
26+
| Remove container by a regular expression | `docker container ls -a \| grep wildfly \| awk '{print $1}' \| xargs docker container rm -f`
27+
| Remove all exited containers | `docker container rm -f $(docker container ls -a \| grep Exit \| awk '{ print $1 }')`
28+
| Remove all containers | `docker container rm $(docker container ls -aq)`
2929
| Find IP address of the container | `docker container inspect --format '{{ .NetworkSettings.IPAddress }}' ${CID}`
3030
| Attach to a container | `docker container attach ${CID}`
3131
| Open a shell in to a container | `docker container exec -it ${CID} bash`
32-
| Get container id for an image by a regular expression | `docker container ps \| grep wildfly \| awk '{print $1}'`
32+
| Get container id for an image by a regular expression | `docker container ls \| grep wildfly \| awk '{print $1}'`
3333
|==================
3434

3535
=== Exit code status

developer-tools/java/chapters/ch01-setup.adoc

+1-9
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,10 @@ This section describes the hardware and software needed for this workshop, and h
1111

1212
== Install Docker
1313

14-
Docker runs natively on Mac, Windows and Linux. Follow the instructions to install Docker:
15-
16-
. https://docs.docker.com/docker-for-mac/[Mac]
17-
. https://docs.docker.com/docker-for-windows/[Windows]
18-
. https://docs.docker.com/engine/installation/linux/centos/[Centos]
19-
. https://docs.docker.com/engine/installation/linux/debian/[Debian]
20-
. https://docs.docker.com/engine/installation/linux/ubuntulinux/[Ubuntu]
14+
Docker runs natively on Mac, Windows and Linux. This lab will use https://www.docker.com/community-edition[Docker Community Edition]. Follow the https://www.docker.com/community-edition[instructions] to install Docker.
2115

2216
NOTE: Docker for Mac and Windows have requirements for a fairly recent operating system version. If your machine does not meet these requirements, then you need to install https://www.docker.com/products/docker-toolbox[Docker Toolbox].
2317

24-
Complete set of operating systems are listed at http://docs.docker.com/engine/installation/[Install Docker Engine].
25-
2618
=== Additional components
2719

2820
Install the following additional components:

developer-tools/java/chapters/ch10-cli.adoc

-4
This file was deleted.

developer-tools/java/chapters/ch10-ddc.adoc

-4
This file was deleted.

0 commit comments

Comments
 (0)