From b4d3569c972629f23d0ed0f44706965b346e2ada Mon Sep 17 00:00:00 2001 From: Micah Abbott Date: May 19 2020 18:19:40 +0000 Subject: [PATCH 1/2] setup-docker: fix magazine script extension The script to pull the magazine content is a Python script, not bash. --- diff --git a/modules/ROOT/pages/setup-docker.adoc b/modules/ROOT/pages/setup-docker.adoc index 99b4804..9514a62 100644 --- a/modules/ROOT/pages/setup-docker.adoc +++ b/modules/ROOT/pages/setup-docker.adoc @@ -61,7 +61,7 @@ within the container: [source,bash] ---- -sudo docker run -it --rm -v "$(pwd):/opt/:z" fedora-websites python ./scripts/pull-magazine.sh +sudo docker run -it --rm -v "$(pwd):/opt/:z" fedora-websites python ./scripts/pull-magazine.py ---- == Running the development server From 49aa047c0eaf003489fdad6a1c0d85f717b9af44 Mon Sep 17 00:00:00 2001 From: Micah Abbott Date: May 19 2020 18:29:26 +0000 Subject: [PATCH 2/2] drop references to Docker/docker We are in the age of Fedora 32 where `podman` is the preferred container runtime tool in the Fedora ecosystem. Let's promote this by dropping references to Docker/docker from our instructions. --- diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index 6569502..0a95274 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -1,4 +1,4 @@ -* xref:setup-docker.adoc[Getting Set Up (Docker)] +* xref:setup-docker.adoc[Getting Set Up (Podman)] * xref:setup.adoc[Getting Set Up (old method)] * xref:fedora-release.adoc[Fedora Beta/GA Release] * xref:newcontent.adoc[Creating New Content] diff --git a/modules/ROOT/pages/fedora-release.adoc b/modules/ROOT/pages/fedora-release.adoc index 2f9d521..a97af70 100644 --- a/modules/ROOT/pages/fedora-release.adoc +++ b/modules/ROOT/pages/fedora-release.adoc @@ -7,7 +7,7 @@ Rick Elrod [NOTE] ==== This assume you have a working setup already. See the other documents (e.g. the -one using Docker to get a development environment working) to get set up. Also, +one using Podman to get a development environment working) to get set up. Also, if using a container-based environment, *ensure that the image you're using reflects the latest `Dockerfile` in the root of the repository.* ==== diff --git a/modules/ROOT/pages/setup-docker.adoc b/modules/ROOT/pages/setup-docker.adoc index 9514a62..192fd8d 100644 --- a/modules/ROOT/pages/setup-docker.adoc +++ b/modules/ROOT/pages/setup-docker.adoc @@ -1,23 +1,16 @@ -= Getting Set Up (using Docker) += Getting Set Up (using Podman) Rick Elrod :page-authors: {author} == Preliminary Notes It is now easier to get started on developing the Fedora Websites with the use -of Docker (or Podman). +of Podman. We ship a `Dockerfile` which will install dependencies into an image for you, so all you are left to do is mount the site as a volume, pull translations, and start the development server. -[NOTE] -==== -The documentation here refers to `docker`, but our fairly simple use -of it means that things are likely to work with `podman` with little -modification. -==== - == Building the container image First clone the repository: @@ -30,11 +23,11 @@ git clone https://pagure.io/fedora-web/websites.git (You may instead clone your fork of it, or add your fork as a second remote later on.) -Now ensure Docker is running and run: +Now build the container image with: [source,bash] ---- -sudo docker build -t fedora-websites . +sudo podman build -t fedora-websites . ---- This will generate a container image for you to use. @@ -46,10 +39,10 @@ the container: [source,bash] ---- -sudo docker run -it --rm -v "$(pwd):/opt/:z" fedora-websites ./scripts/pull-translations.sh +sudo podman run -it --rm -v "$(pwd):/opt/:z" fedora-websites ./scripts/pull-translations.sh ---- -Notice here that we are mounting a volume (`-v`) in Docker which +Notice here that we are mounting a volume (`-v`) via podman which points to our check-out of the repository. We're referring to the `fedora-websites` image created above, and calling the `./scripts/pull-translations.sh` script from within it. @@ -61,7 +54,7 @@ within the container: [source,bash] ---- -sudo docker run -it --rm -v "$(pwd):/opt/:z" fedora-websites python ./scripts/pull-magazine.py +sudo podman run -it --rm -v "$(pwd):/opt/:z" fedora-websites python ./scripts/pull-magazine.py ---- == Running the development server @@ -70,7 +63,7 @@ Now we are ready to run the development server: [source,bash] ---- -sudo docker run -it --rm -v "$(pwd):/opt/:z" -p 5000:5000 fedora-websites flask run --reload --host 0.0.0.0 +sudo podman run -it --rm -v "$(pwd):/opt/:z" -p 5000:5000 fedora-websites flask run --reload --host 0.0.0.0 ---- Note that we need `-p 5000:5000` so that we can access the development