From Fedora Project Wiki
(Created page with "{{QA/Test_Case |description=This is a simple testcase to determine whether docker containers run properly on an Atomic Host. {{Admon/note|Prerequisite|This testcase assumes yo...")
 
m (add running container using podman)
 
(2 intermediate revisions by 2 users not shown)
Line 7: Line 7:
# Run a dockerized application
# Run a dockerized application
# Example:
# Example:
  docker run -it --rm busybox true && echo "PASS" || echo "FAIL"
  docker run -it --rm docker.io/busybox true && echo "PASS"  
or,
podman run -it --rm docker.io/busybox true && echo "PASS"
 
|results=
|results=
# Output from the example command should resemble:
# Output from the example command should resemble:
  Unable to find image 'busybox' locally
  <nowiki>
Pulling repository busybox
# docker run -it --rm docker.io/busybox true && echo "PASS"
e72ac664f4f0: Download complete  
Unable to find image 'docker.io/busybox:latest' locally
511136ea3c5a: Download complete
Trying to pull repository docker.io/library/busybox ...
df7546f9f060: Download complete
sha256:58ac43b2cc92c687a32c8be6278e50a063579655fe3090125dcb2af0ff9e1a64: Pulling from docker.io/library/busybox
  e433a6c5b276: Download complete
f70adabe43c0: Pull complete  
  PASS
Digest: sha256:58ac43b2cc92c687a32c8be6278e50a063579655fe3090125dcb2af0ff9e1a64
# Ensure that the docker daemon is using the storage set up by docker-storage-setup
Status: Downloaded newer image for docker.io/busybox:latest
  # lsblk
PASS
NAME                             MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
 
  vda                               252:0    0   20G 0 disk  
# podman run -it --rm docker.io/busybox true && echo "PASS"
├─vda1                           252:1    0 200M 0 part /boot
Trying to pull docker.io/busybox...Getting image source signatures
└─vda2                           252:2    0 19.8G 0 part  
Copying blob sha256:8c5a7da1afbc602695fcb2cd6445743cec5ff32053ea589ea9bd8773b7068185
  ├─atomicos-root                 253:0    0    4G 0 lvm  /sysroot
  716.06 KB / 716.06 KB [====================================================] 0s
  ├─atomicos-docker--meta        253:1    0  24M  0 lvm 
Copying config sha256:e1ddd7948a1c31709a23cc5b7dfe96e55fc364f90e1cebcde0773a1b5a30dcda
  │ └─docker-253:0-6298462-pool  253:3    0  10G  0 dm 
  1.46 KB / 1.46 KB [========================================================] 0s
  │  └─docker-253:0-6298462-base 253:4    0  10G  0 dm 
Writing manifest to image destination
  └─atomicos-docker--data        253:2    0  10G  0 lvm 
Storing signatures
    └─docker-253:0-6298462-pool  253:3    0  10G  0 dm 
PASS
      └─docker-253:0-6298462-base 253:4    0  10G  0 dm
</nowiki>
 
# Ensure that the docker daemon is using the overlay2 storage driver set up by container-storage-setup
  <nowiki>
# lsblk
NAME             MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0                11:0    1  366K  0 rom  
vda               252:0    0   6G 0 disk  
├─vda1           252:1    0   1G 0 part /boot
└─vda2           252:2    0   5G 0 part  
  └─atomicos-root 253:0    0    5G 0 lvm  /sysroot
# docker info | grep Storage
Storage Driver: overlay2
</nowiki>
}}
}}

Latest revision as of 07:23, 1 October 2018

Description

This is a simple testcase to determine whether docker containers run properly on an Atomic Host.

Note.png
Prerequisite
This testcase assumes you have already ran the boot test.

Setup

  1. Ensure you have a booted working Atomic Host

How to test

  1. Run a dockerized application
  2. Example:
docker run -it --rm docker.io/busybox true && echo "PASS" 

or,

podman run -it --rm docker.io/busybox true && echo "PASS"

Expected Results

  1. Output from the example command should resemble:
# docker run -it --rm docker.io/busybox true && echo "PASS"
Unable to find image 'docker.io/busybox:latest' locally
Trying to pull repository docker.io/library/busybox ... 
sha256:58ac43b2cc92c687a32c8be6278e50a063579655fe3090125dcb2af0ff9e1a64: Pulling from docker.io/library/busybox
f70adabe43c0: Pull complete 
Digest: sha256:58ac43b2cc92c687a32c8be6278e50a063579655fe3090125dcb2af0ff9e1a64
Status: Downloaded newer image for docker.io/busybox:latest
PASS

# podman run -it --rm docker.io/busybox true && echo "PASS"
Trying to pull docker.io/busybox...Getting image source signatures
Copying blob sha256:8c5a7da1afbc602695fcb2cd6445743cec5ff32053ea589ea9bd8773b7068185
 716.06 KB / 716.06 KB [====================================================] 0s
Copying config sha256:e1ddd7948a1c31709a23cc5b7dfe96e55fc364f90e1cebcde0773a1b5a30dcda
 1.46 KB / 1.46 KB [========================================================] 0s
Writing manifest to image destination
Storing signatures
PASS

  1. Ensure that the docker daemon is using the overlay2 storage driver set up by container-storage-setup
# lsblk
NAME              MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0                11:0    1  366K  0 rom  
vda               252:0    0    6G  0 disk 
├─vda1            252:1    0    1G  0 part /boot
└─vda2            252:2    0    5G  0 part 
  └─atomicos-root 253:0    0    5G  0 lvm  /sysroot
# docker info | grep Storage
Storage Driver: overlay2