Skip to main contentKubernetes   Training

Create your first Image

🚀 TASK: Install on Mac or PC Create your first Image

K8s CNI
  1. Let’s create our first image (the k8sdemo-backend image) from this Dockerfile:

    FROM node:8-stretch
    # Change working directory
    WORKDIR "/app"
    # Update packages and install dependency packages for services
    RUN apt-get update \
    && apt-get dist-upgrade -y \
    && apt-get clean \
  2. Run the following command:

    cd ./demo-app/k8sdemo_backend
    podman build -t k8sdemo-backend:lab .
    cd -
    > STEP 1/11: FROM node:8-stretch
    > Resolved "node" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
    > Trying to pull docker.io/library/node:8-stretch...
    > Getting image source signatures
    > Copying blob sha256:403697a3e152c7a38ddb9175a90ed2dac97d780421c35949ff80cd67a7d4e596
    > Copying blob sha256:b4f31062581dadb1f69c43e9441040dd46788bf13ae51f20c66929fac82b506b
    ...
    > Copying config sha256:50c57a9369c7f4cec5075389125ea0c9fb23f58efae84747b726cc9452844926
    > Writing manifest to image destination