#184 Update Dockerfile to fedora34.
Merged 3 years ago by darknao. Opened 3 years ago by nielsenb.
fedora-web/ nielsenb/websites local-fedora34  into  master

file modified
+15 -15
@@ -1,26 +1,26 @@ 

- FROM fedora:29

+ FROM registry.fedoraproject.org/fedora:34

  

  WORKDIR /opt/sites/getfedora.org/

  

  RUN dnf -y install \

      git \

-     python-flask \

-     python-frozen-flask \

-     python-flask-assets \

-     python-rjsmin \

-     python-cssmin \

-     python-flask-babel \

-     python-flask-htmlmin \

-     python-cssutils \

+     python3-flask \

+     python3-frozen-flask \

+     python3-flask-assets \

+     python3-rjsmin \

+     python3-cssmin \

+     python3-flask-babel \

+     python3-flask-htmlmin \

+     python3-cssutils \

      rubygem-sass \

      babel \

      python3-jinja2 \

-     python-pyyaml \

-     python-dateutil \

-     python-dogpile-cache \

-     python-requests \

-     python-gnupg \

-     python-fedfind && \

+     python3-pyyaml \

+     python3-dateutil \

+     python3-dogpile-cache \

+     python3-requests \

+     python3-gnupg \

+     python3-fedfind && \

        dnf clean all

  

  ENV FLASK_APP main.py

file modified
+11 -3
@@ -16,11 +16,19 @@ 

  

  Podman is the recommended way of building fedora-websites.

  

- From the root of the repository, run the following commands to start a local server:

+ From the root of the repository, run the following commands to build the necessary components:

  

  ```

  podman build -t fedora-websites .

  podman run -it --rm -v "$(pwd):/opt/:z" fedora-websites ./scripts/pull-translations.sh

- podman run -it --rm -v "$(pwd):/opt/:z" fedora-websites python ./scripts/pull-magazine.py

- podman run -it --rm -v "$(pwd):/opt/:z" fedora-websites python main.py

+ podman run -it --rm -v "$(pwd):/opt/:z" fedora-websites python3 ./scripts/pull-magazine.py

+ podman run -it --rm -v "$(pwd):/opt/:z" fedora-websites python3 main.py

  ```

+ 

+ Now we are ready to run the development server:

+ 

+ ```

+ podman run -it --rm -v "$(pwd):/opt/:z" -p 5000:5000 fedora-websites flask run --reload --host 0.0.0.0

+ ```

+ 

+ You may now go to <http://localhost:5000/> in your browser of choice.

This requires updating some dependencies to their python3 package name and updating the documentation for running a local build to reflect the python3 requirement.

This is basically a light touch up of PR 67[0]. Fixes issue 183[1].

[0] - https://pagure.io/fedora-web/websites/pull-request/67
[1] - https://pagure.io/fedora-web/websites/issue/183

It also would make sense to change FROM fedora:34 to FROM registry.fedoraproject.org/fedora:34, just to be explicit.

With the current Dockerfile, Podman defines fedora as an alias to registry.fedoraproject.org/fedora in /etc/containers/registries.conf.d/000-shortnames.conf, which is a problem, because the 29 tag is only available on docker.io/library/fedora.

I can do that, there's also discussion[0] on the other websites repo about using fedora:latest/python:latest if that would be preferable.

[0] - https://pagure.io/fedora-websites/issue/1009#comment-736340

1 new commit added

  • Make docker registry explicit.
3 years ago

rebased onto e806572

3 years ago

Pull-Request has been merged by darknao

3 years ago
Metadata