Skip to content

Commit f7df513

Browse files
committed
Fix typos and wording in assignments
1 parent fa4af3d commit f7df513

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

_assignments/assignment_01.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Assignment 1 - Hello World
2-
To run you first container, please execute the following command on your machine:
2+
To run your first container, please execute the following command on your machine:
33
```
44
docker container run hello-world
55
```

_assignments/assignment_03.md

+4
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,8 @@ docker container prune
9090

9191
*__!!Attention!!__* This will delete all stopped containers on your system.
9292

93+
94+
# Our changes
95+
You can find our changes in the [`initial_dockerfile` branch](https://github.com/jfahrer/dockerizing_rails/tree/initial_dockerfile) and [compare it to the previous branch](https://github.com/jfahrer/dockerizing_rails/compare/initial_dockerfile)
96+
9397
[Back to the overview](../README.md#assignments)

_assignments/assignment_08.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Assignment 8 - Iterating
2-
Rebuilding the image every time we make changes is tedious and slows us down in our development workflow. But Docker wouldn't be Docker if we couldn't work around this problem. The solution here are so called bind mounts. A bind-mount allows us to mount a local file or directory into the containers file system. When using the Docker CLI, you can specify the bind-mount using the `-v` flag. With Docker Compose, we simply add the definition the `docker-compose.yml` via the `volumes` directive. Here is an example:
2+
Rebuilding the image every time we make changes is tedious and slows us down in our development workflow. But Docker wouldn't be Docker if we couldn't work around this problem. The solution here are so called bind mounts. A bind-mount allows us to mount a local file or directory into the containers file system. For the Docker CLI, we can specify the bind-mount using the `-v` flag. With Docker Compose, we simply add the definition the `docker-compose.yml` via the `volumes` directive. Here is an example:
33

44
```yaml
55
app:

_assignments/assignment_09.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ But before we make the change, let's try to get a `byebug` session from an actua
9696

9797
What should happen is that the Rails server stop and opens a `byebug` - but as you can tell, this doesn't work. The request is processed and http response is returned to our browser. This happens because by default the contains that are started with `docker-compose up` (as well as `docker-compose start` and `docker-compose restart`) don't have a tty attached and `byebug` can't hence not start the session.
9898

99-
We've seen that opening a byebug session works when we use `docker-compose run`. It does because Docker Compose will automatically attach a pseudo-tty for us and attach STDIN as well. So let's start the Rails server with `docker-compose run` instead. We have to first shut down the current app service, otherwise we will not be able to start a new Rails server because port 3000 is already in use.
99+
We've seen that opening a byebug session works when we use `docker-compose run`. It does because Docker Compose will automatically attach a pseudo-tty for us and attach `STDIN` as well. So let's start the Rails server with `docker-compose run` instead. We have to first shut down the current app service, otherwise we will not be able to start a new Rails server because port 3000 is already in use.
100100
```
101101
docker-compose stop app
102102
```
@@ -111,19 +111,19 @@ Since we defined the port mapping in our `docker-compose.yml` and `rails server`
111111
docker-compose run --rm --service-ports app
112112
```
113113

114-
If you now mark another todo as complete or active you will be dropped into a `byebug` session.
114+
If we now mark another todo as complete or active we will be dropped into a `byebug` session.
115115

116-
You already know how to fix the issue. Go ahead and make the code change and make sure that the test passes.
116+
We already know how to fix the issue. Go ahead and make the code change and make sure that the test passes.
117117

118118
## Making it work without stopping the server
119-
Depending on your style of working, starting and stopping the container whenever we want to start a `byebug` session can might be tedious. The good news is that there is another way! We can add the following settings to our `app` service definition in the `docker-compose.yml`:
119+
Depending on your style of working, starting and stopping the container whenever we want to start a `byebug` session might be tedious. The good news is that there is another way! We can add the following settings to our `app` service definition in the `docker-compose.yml`:
120120

121121
```yaml
122122
tty: true
123123
stdin_open: true
124124
```
125125
126-
These to flags do what `docker-compose run` does for us automatically: They will attach a pseudo-tty to the container and keep STDIN open. You can find a complete example in `_examples/docker-compose.yml.with_tty`.
126+
These to flags do what `docker-compose run` does for us automatically: They will attach a pseudo-tty to the container and keep `STDIN` open. You can find a complete example in `_examples/docker-compose.yml.with_tty`.
127127

128128
With these flags in place we can now restart our containers with
129129
```
@@ -157,6 +157,6 @@ docker attach dockerizing_rails_app_1
157157
158158
And there we go! If you press `ENTER` you will see that you are in a `byebug` session, just as before.
159159
160-
If we end the session by typing `continue`, we will see the Rails log on our screen - we are still attached to the container. In order to detach from the container you can use the key sequence `Ctrl-p` `Ctrl-q`. You could also `Ctrl-c`, but that would terminate the container and you would have to restart the service.
160+
If we end the session by typing `continue`, we will see the Rails log on our screen - we are still attached to the container. In order to detach from the container we can use the key sequence `Ctrl-p` `Ctrl-q`. We could also press `Ctrl-c`, but that would terminate the container and we would have to restart the service.
161161
162162
__*Side note*__: The naming conventions of Docker Compose makes it pretty straight forward to "guess". I also recommend using command-line completion for Docker and [Docker compose](https://docs.docker.com/compose/completion/)

0 commit comments

Comments
 (0)