From bab5ccea4e7c18ee326177f200944bc8d7e08491 Mon Sep 17 00:00:00 2001 From: Jenny Jiang <92122927+jenjenkayi@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:31:55 -0800 Subject: [PATCH] Update Docker info in CONTRIBUTING.md Section 2.7.b (#7631) * update Docker info in contributing.md section 2.7.b * update the hyperlinks in the table of contents to reflect the new titles * update the hyperlinks in the table of contents to reflect the new titles * update the hyperlinks in the table of contents to reflect the new titles * update details in 2.7.b * update details in 2.7.b * updated changes in 2.7.b.i --- CONTRIBUTING.md | 47 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3748f35751..0c3d90546a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,8 +51,8 @@ The following is a set of guidelines for contributing to the website repository, - [**2.6.b What to do if you have to stop working mid issue:**](#26b-what-to-do-if-you-have-to-stop-working-mid-issue) - [**2.7 Working on an issue**](#27-working-on-an-issue) - [**2.7.a Working on an issue (1): Verify current branch is `gh-pages`**](#27a-working-on-an-issue-1-verify-current-branch-is-gh-pages) - - [**2.7.b Working on an issue (2): Create a new branch where you will work on your issue**](#27b-working-on-an-issue-2-create-a-new-branch-where-you-will-work-on-your-issue) - - [**i. What if you cannot see your changes locally within Docker?**](#i-what-if-you-cannot-see-your-changes-locally-within-docker) + - [**2.7.b Working on an issue (2): Creating and testing your issue branch**](#27b-working-on-an-issue-2-creating-and-testing-your-issue-branch) + - [**i. A few notes regarding Docker:**](#i-a-few-notes-regarding-docker) - [**2.7.c Working on an issue(3): Prepare your changes to push to your repository**](#27c-working-on-an-issue3-prepare-your-changes-to-push-to-your-repository) - [**i. Prepare repo changes (1): Use the `git add` command to stage your changes.**](#i-prepare-repo-changes-1-use-the-git-add-command-to-stage-your-changes) - [**ii. Prepare repos changes (2): Use the `git status` command to see what files are staged.**](#ii-prepare-repos-changes-2-use-the-git-status-command-to-see-what-files-are-staged) @@ -520,7 +520,7 @@ git pull upstream gh-pages [Back to Table of Contents](#table-of-contents) -#### **2.7.b Working on an issue (2): Create a new branch where you will work on your issue** +#### **2.7.b Working on an issue (2): Creating and testing your issue branch** If you have not already done so, run `git checkout gh-pages` to switch the working directory to the `gh-pages` branch and then update `gh-pages` with upstream changes as described above in Section 2.7.a. @@ -546,17 +546,44 @@ We urge developers to be cautious using `git add`. In general it is not advisabl When you've finished working on your issue, follow the steps below to prepare your changes to push to your repository. -##### **i. What if you cannot see your changes locally within Docker?** +##### **i. A few notes regarding Docker:** -If you do not see the changes you applied when you run `docker-compose up`, **do the following**: +- To test your issue branch locally, run the command "docker-compose up" from a terminal window. The website will then be accessible at http://localhost:4000. -1. Stop running your Docker application (if still running). -2. Delete the `_site` directory in the root folder (`website`) -3. Delete the `.jekyll-metadata` file in the root folder (`website`) -4. Finally, restart docker (run `docker-compose up` in the terminal) and you should see your changes. -

+- The Docker Desktop application must be running, otherwise `docker-compose up` will not work +- Docker pulls an image from Dockerhub.com which enables Docker to build the website locally with the same environment used to build the site at GitHub. As the environment and dependencies change, HfLA engineers update the Dockerhub image; however, the image updated at Dockerhub is not automatically downloaded, so it is necessary to periodically check to determine if the local image is outdated, and if so, to pull the updates from Dockerhub. Use this process: + +- In the Docker Desktop application, from the `Images` page, click the Action menu (3 dots) for the image `hackforlaops/ghpages`, select option `View details`. + - In the new Docker Desktop application, select option `View packages and CVEs` instead. + +
+ Click here to see how to view details for a Docker image + + +
+ +- Note the `CREATED` column +
+ Click here to see how to determine when an image was last updated in Docker Desktop + +
+ +- View the details of the "latest" tag from [hackforlaops Dockerhub image tags](https://hub.docker.com/r/hackforlaops/ghpages/tags) and determine when an image was pushed to Docker hub +
+ Click here to see how to determine when an image was pushed to Docker hub + +
+ +- If the "latest" tagged image at Docker hub is more recent than the image in Docker Desktop, use the Docker Desktop Action menu (3 dots) to "pull" down the updated image +
+ Click here to see how to pull image from DockerHub + +
+ +- Note that the next `docker-compose up` will take extra time to recreate the Docker container based on the updated image. - If the above steps did not resolve your issue, run through the first three steps again, but try resetting your browser's cache before restarting docker (you can also try running http://localhost:4000 in another browser). + - If you still do not see your changes after trying these steps, please feel free to reach out to the team in the [#hfla-site](https://hackforla.slack.com/archives/C4UM52W93) Slack channel, or bring up your issue in a dev meeting. [Back to Table of Contents](#table-of-contents)