Welcome to the Linux Foundation Forum!

LAB 7.2 - Section Image caching and build times

Hi,

It looks like in the LAB 7.2 - Section Image caching and build times some information was omitted prior to starting this.
From reading the output of the first command the Dockerfile used is not the one created just prior to this as it is using a different base image specified in FROM.

Prior the FROM was configured to use alpine and the output seems to be using the official nginx Dockerfile to some extent as it is using the buster-slim base image.
Using the basic Dockerfile created prior to this section will cause the subsequent steps to file with a missing file error for the ln to /var/log/nginx/access.log.

Looking further down the lab there are steps described that are already in the official nginx Dockerfile so that would somewhat negate the reason for having this lab.

Please let me know if there is a basic Dockerfile that needs to be used for this or if this lab needs to be performed on the official nginx Dockerfile.

Regards,

Ramon

Comments

  • chrispokorni
    chrispokorni Posts: 2,155

    Hi Ramon,

    You are correct, there is no continuity between the first section of Lab 7.2 where we build an image from the custom Dockerfile which includes FROM alpine, and the following section "Image caching and build times" where the focus is on local build times while using the default nginx Dockerfile from Docker Hub.

    Perhaps a new directory would have helped to clarify this.

    Thanks for pointing this out. We will try to update the lab exercise to clarify the shift in Dockerfiles between the two sections of Lab 7.2

    Regards,
    -Chris

  • RSchipper
    RSchipper Posts: 2

    Hi Chris,

    Thanks for the quick response. I did get the official docker file and was able to continue.
    Other then that I am very happy with the course.

    Kind Regards,

    Ramon

  • I am running into the same issue.

    ln: /var/log/nginx/access.log: No such file or directory

    @RSchipper , you mentioned a workaround, getting an official dockerfile. How should I go about this @chrispokorni ?
    TIA.

  • chrispokorni
    chrispokorni Posts: 2,155

    Hi @Jenad1kr,

    In order to retrieve a Dockerfile you go to https://hub.docker.com/, you type "nginx" in the Search box, then click on the first result for the official nginx image, then you will find a section named Supported tags and respective Dockerfile links where you click the link for the latest tagged image and that should direct you to the Dockerfile on github.

    Regards,
    -Chris

Categories

Upcoming Training