Welcome to the Linux Foundation Forum!

Hello, just started the LFS250, but issues on the first demo video

Hi,
I tried to replicate what was done on Chapter 3 first video, using docker and podman.
Docker works flawless, even with Docker Desktop. When trying to do the same on a different Virtual Machine, I installed podman and also Podman Desktop. The command line:

$ podman run --detach --publish-all nginx:latest 
or
$ podamn run --detach --publish-all nginx:1.20

Return this error:
Error: short-name "nginx:latest" did not resolve to an alias and no unqualified-search registries are defined in "/etc/containers/registries.conf"

I was able to solve the issue with:

podman run --detach --publish-all docker.io/nginx:latest 
Trying to pull docker.io/library/nginx:latest...
Getting image source signatures
Copying blob 943ea0f0c2e4 done   | 
Copying blob 7cf63256a31a done   | 
Copying blob d014f92d532d done   | 
Copying blob 513c3649bb14 done   | 
Copying blob bf9acace214a done   | 
Copying blob 9dd21ad5a4a6 done   | 
Copying blob 103f50cb3e9f done   | 
Copying config b52e0b094b done   | 
Writing manifest to image destination
f5136ce53f384ac4e184cb702c29d024da41f1541f9cef9e051491883308d5a1

Comments

  • fmiranda
    fmiranda Posts: 9

    On Chapter 3 as well, following the Demo: Building Container Images

    This instructions, in the description would have been helpful:

    • create a working directory for your application and enter that directorr
      mkdir app1

    then

    git clone https://github.com/docker/getting-started-app.git
    
    
    • Create your Dockerfile with the following content:
    FROM node:lts-alpine
    WORKDIR /app
    COPY . .
    RUN yarn install --production
    CMD ["node", "src/index.js"]
    EXPOSE 3000
    
    • enter the directory
      getting-started-app

    • run the command

    podman build -t getting-started2 . -f ../Dockerfile
    
    
    • then run the command below to check your new image
      podman images

    • then run the container image:

    podman run -d -p 3000:3000 getting-started
    
    
    • Then open your Browser and enter the text below on the URL field:
      localhost:3000

    Voilá

Categories

Upcoming Training