forked from BretFisher/udemy-docker-mastery
-
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.
* fixing lints * trying input * removing outdated changelogs. Using GH Projects * fixing lints
- Loading branch information
1 parent
21518c9
commit 5c9ce12
Showing
16 changed files
with
135 additions
and
98 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
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 was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,55 @@ | ||
# Assignment: Compose For On-The-Fly Image Building and Multi-Container Testing | ||
|
||
Goal: This time imagine you're just wanting to learn Drupal's admin and GUI, or maybe you're a software tester and you need to test a new theme for Drupal. When configured properly, this will let you build a custom image and start everything with `docker-compose up` including storing important db and config data in volumes so the site will remember your changes across Compose restarts. | ||
Goal: This time imagine you're just wanting to learn Drupal's admin and GUI, or maybe you're | ||
a software tester and you need to test a new theme for Drupal. When configured properly, | ||
this will let you build a custom image and start everything with `docker-compose up` | ||
including storing important db and config data in volumes so the site will remember your | ||
changes across Compose restarts. | ||
|
||
- Use the compose file you created in the last assignment (drupal and postgres) as a starting point. | ||
- Let's pin image version from Docker Hub this time. It's always a good idea to do that so a new major version doesn't surprise you. | ||
- Let's pin image version from Docker Hub this time. | ||
It's always a good idea to do that so a new major version doesn't surprise you. | ||
|
||
## Dockerfile | ||
- First you need to build a custom Dockerfile in this directory, `FROM drupal:8.8.2` NOTE: if it fails to build, try the latest 8 branch version with `FROM drupal:8` | ||
|
||
- First you need to build a custom Dockerfile in this directory, | ||
`FROM drupal:8.8.2` NOTE: if it fails to build, try the latest 8 branch version with `FROM drupal:8` | ||
- Then RUN apt package manager command to install git: `apt-get update && apt-get install -y git` | ||
- Remember to cleanup after your apt install with `rm -rf /var/lib/apt/lists/*` and use `\` and `&&` properly. You can find examples of them in drupal official image. More on this below under Compose file. | ||
- Remember to cleanup after your apt install with `rm -rf /var/lib/apt/lists/*` and use `\` and `&&` properly. | ||
You can find examples of them in drupal official image. More on this below under Compose file. | ||
- Then change `WORKDIR /var/www/html/themes` | ||
- Then use git to clone the theme with: `RUN git clone --branch 8.x-3.x --single-branch --depth 1 https://git.drupalcode.org/project/bootstrap.git` | ||
- Combine that line with this line, as we need to change permissions on files and don't want to use another image layer to do that (it creates size bloat). This drupal container runs as www-data user but the build actually runs as root, so often we have to do things like `chown` to change file owners to the proper user: `chown -R www-data:www-data bootstrap`. Remember the first line needs a `\` at end to signify the next line is included in the command, and at start of next line you should have `&&` to signify "if first command succeeds then also run this command" | ||
- Then use git to clone the theme with: | ||
`RUN git clone --branch 8.x-3.x --single-branch --depth 1 https://git.drupalcode.org/project/bootstrap.git` | ||
- Combine that line with this line, as we need to change permissions on files and don't want to | ||
use another image layer to do that (it creates size bloat). | ||
This drupal container runs as www-data user but the build actually runs as root, | ||
so often we have to do things like `chown` to change file owners to the proper user: | ||
`chown -R www-data:www-data bootstrap`. Remember the first line needs a `\` at end | ||
to signify the next line is included in the command, and at start of next line you should have | ||
`&&` to signify "if first command succeeds then also run this command" | ||
- Then, just to be safe, change the working directory back to its default (from drupal image) at `/var/www/html` | ||
|
||
## Compose File | ||
- We're going to build a custom image in this compose file for drupal service. Use Compose file from previous assignment for Drupal to start with, and we'll add to it, as well as change image name. | ||
|
||
- We're going to build a custom image in this compose file for drupal service. | ||
Use Compose file from previous assignment for Drupal to start with, and we'll add to it, as well as change image name. | ||
- Rename image to `custom-drupal` as we want to make a new image based on the official `drupal:8.8.2`. | ||
- We want to build the default Dockerfile in this directory by adding `build: .` to the `drupal` service. When we add a build + image value to a compose service, it knows to use the image name to write to in our image cache, rather then pull from Docker Hub. | ||
- For the `postgres:12.1` service, you need the same password as in previous assignment, but also add a volume for `drupal-data:/var/lib/postgresql/data` so the database will persist across Compose restarts. | ||
- We want to build the default Dockerfile in this directory by adding `build: .` to the `drupal` service. | ||
When we add a build + image value to a compose service, | ||
it knows to use the image name to write to in our image cache, rather then pull from Docker Hub. | ||
- For the `postgres:12.1` service, you need the same password as in previous assignment, | ||
but also add a volume for `drupal-data:/var/lib/postgresql/data` so the database will | ||
persist across Compose restarts. | ||
|
||
## Start Containers, Configure Drupal | ||
|
||
- Start containers like before, configure Drupal web install like before. | ||
- After website comes up, click on `Appearance` in top bar, and notice a new theme called `Bootstrap` is there. That's the one we added with our custom Dockerfile. | ||
- Click `Install and set as default`. Then click `Back to site` (in top left) and the website interface should look different. You've successfully installed and activated a new theme in your own custom image without installing anything on your host other than Docker! | ||
- If you exit (ctrl-c) and then `docker-compose down` it will delete containers, but not the volumes, so on next `docker-compose up` everything will be as it was. | ||
- After site comes up, click on `Appearance` in top bar, and notice a new theme called`Bootstrap` is there. | ||
That's the one we added with our custom Dockerfile. | ||
- Click `Install and set as default`. | ||
Then click `Back to site` (in top left) and the site interface should look different. | ||
You've successfully installed and activated a new theme in your own custom image without | ||
installing anything on your host other than Docker! | ||
- If you exit (ctrl-c) and then `docker-compose down` it will delete containers, | ||
but not the volumes, so on next `docker-compose up` everything will be as it was. | ||
- To totally clean up volumes, add `-v` to `down` command. |
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,13 +1,12 @@ | ||
# Commands for setting up a local registry | ||
|
||
|
||
- enable insecure registries in Daemon | ||
|
||
|
||
|
||
|
||
- Enable SSL | ||
|
||
```shell | ||
mkdir -p certs | ||
openssl req -newkey rsa:4096 -nodes -sha256 -keyout certs/domain.key -x509 -days 365 -out certs/domain.crt | ||
``` | ||
|
||
docker run --rm -e COMMON_NAME=127.0.0.1 -e KEY_NAME=registry -v $(pwd)/certs:/certs centurylink/openssl | ||
`docker run --rm -e COMMON_NAME=127.0.0.1 -e KEY_NAME=registry -v $(pwd)/certs:/certs centurylink/openssl` |
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,8 @@ | ||
# Vital DevOps (aka Docker Mastery) community Code of Conduct | ||
|
||
All members of our chat communities are required to agree with the following code of conduct. Organizers will enforce this code throughout all channels. We are expecting cooperation from all participants to help ensuring a safe environment for everybody. | ||
All members of our chat communities are required to agree with the following code of conduct. | ||
Organizers will enforce this code throughout all channels. | ||
We are expecting cooperation from all participants to help ensuring a safe environment for everybody. | ||
|
||
## tl;dr | ||
|
||
|
@@ -11,30 +13,54 @@ All members of our chat communities are required to agree with the following cod | |
|
||
## The Quick Version | ||
|
||
Our community, including Discord, Slack, and Udemy is dedicated to providing a harassment-free communication experience for everyone, regardless of gender, gender identity and expression, age, sexual orientation, disability, physical appearance, body size, race, or religion (or lack thereof). We do not tolerate harassment of participants in any form. Sexual language and imagery is not appropriate in any channels. | ||
Our community, including Discord, Slack, and Udemy is dedicated to providing a harassment-free | ||
communication experience for everyone. | ||
We do not tolerate harassment of participants in any form. | ||
Sexual language and imagery is not appropriate in any channels. | ||
|
||
This code of conduct applies to all Vital DevOps and Docker/Kubernetes Mastery spaces, including public channels, private channels and direct messages, both online and off. Anyone who violates this code of conduct may be sanctioned or expelled from these spaces at the discretion of the Slack group organizers. This is a safe space, lets keep it that way. | ||
This code of conduct applies to all Bret Fisher, Vital DevOps, and Docker/Kubernetes Mastery spaces, | ||
including public channels, private channels and direct messages, both online and off. | ||
Anyone who violates this code of conduct may be sanctioned or expelled from these spaces at the | ||
discretion of the Slack group organizers. This is a safe space, lets keep it that way. | ||
|
||
## The Less Quick Version | ||
|
||
Harassment includes offensive comments related to gender, gender identity and expression, age, sexual orientation, disability, physical appearance, body size, race, religion, sexual images, deliberate intimidation, stalking, sustained disruption of channels or other mediums, and unwelcome sexual attention. | ||
Harassment includes offensive comments related to gender, gender identity and expression, age, | ||
sexual orientation, disability, physical appearance, body size, race, religion, sexual images, | ||
deliberate intimidation, stalking, sustained disruption of channels or other mediums, | ||
and unwelcome sexual attention. | ||
|
||
Organizers are also subject to the anti-harassment policy. Organizers should not use sexualized content or otherwise create a sexualized environment. | ||
Organizers are also subject to the anti-harassment policy. | ||
Organizers should not use sexualized content or otherwise create a sexualized environment. | ||
|
||
Participants asked to stop any harassing behavior are expected to comply immediately. If a participant engages in harassing behavior, the Slack group organizers may take any action they deem appropriate, including warning the offender or expulsion from the Slack group. | ||
Participants asked to stop any harassing behavior are expected to comply immediately. | ||
If a participant engages in harassing behavior, the Slack group organizers may take any action | ||
they deem appropriate, including warning the offender or expulsion from the Slack group. | ||
|
||
If you are being harassed, notice that someone else is being harassed, or have any other concerns, please contact [Bret]([email protected]) or a member of the group organizers and moderators immediately. | ||
If you are being harassed, notice that someone else is being harassed, or have any other concerns, | ||
please contact [Bret]([email protected]) or a member of the group organizers and moderators immediately. | ||
|
||
Organizers will be happy to help participants experiencing harassment to feel safe for the duration of their time in our community. We value your contribution to the community. | ||
Organizers will be happy to help participants experiencing harassment to feel safe for the | ||
duration of their time in our community. We value your contribution to the community. | ||
|
||
## Reporting | ||
|
||
If you are being harassed by a member of the Docker Mastery Slack group, notice that someone else is being harassed, or have any other concerns, please [contact a group organizer](https://dockermastery.slack.com/team). Organizers will respond as soon as they are able. If the person who is harassing you is on the admin team, they will recuse themselves from handling your incident. | ||
If you are being harassed by a member of the Docker Mastery Slack group, | ||
notice that someone else is being harassed, or have any other concerns, | ||
please contact [@BretFisher](https://twitter.com/bretfisher) (DM's are open) or | ||
[email protected], or a moderator or TA. Organizers will respond as soon as they are able. | ||
If the person who is harassing you is on the admin team, they will recuse themselves from handling your incident. | ||
|
||
In order to protect volunteers from abuse and burnout, we reserve the right to reject any report we believe to have been made in bad faith. Reports intended to silence legitimate criticism may be deleted without response. | ||
In order to protect volunteers from abuse and burnout, | ||
we reserve the right to reject any report we believe to have been made in bad faith. | ||
Reports intended to silence legitimate criticism may be deleted without response. | ||
|
||
We will respect confidentiality requests for the purpose of protecting victims of abuse. At our discretion, we may publicly name a person about whom we’ve received harassment complaints, or privately warn third parties about them, if we believe that doing so will increase the safety of 757Dev members or the general public. We will not name harassment victims without their affirmative consent. | ||
We will respect confidentiality requests for the purpose of protecting victims of abuse. | ||
At our discretion, we may publicly name a person about whom we’ve received harassment complaints, | ||
or privately warn third parties about them, if we believe that doing so will increase the | ||
safety of members or the general public. We will not name harassment victims without their affirmative consent. | ||
|
||
## Credits | ||
|
||
This Code of Conduct is heavily based on the [Conference Code of Conduct](http://confcodeofconduct.com) and the [ZA Developers Code of Conduct for Slack](https://github.com/zadev/code-of-conduct/blob/master/README.md). | ||
This Code of Conduct is heavily based on the [Conference Code of Conduct](http://confcodeofconduct.com) | ||
and the [ZA Developers Code of Conduct for Slack](https://github.com/zadev/code-of-conduct/blob/master/README.md). |
Oops, something went wrong.