File tree Expand file tree Collapse file tree 8 files changed +588
-0
lines changed
contrib/test/system-container Expand file tree Collapse file tree 8 files changed +588
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM centos
2+
3+ RUN yum-config-manager --nogpgcheck --add-repo https://cbs.centos.org/repos/virt7-container-common-candidate/x86_64/os/ && \
4+ yum install --disablerepo=extras --nogpgcheck --setopt=tsflags=nodocs -y \
5+ btrfs-progs-devel \
6+ device-mapper-devel \
7+ git \
8+ glib2-devel \
9+ glibc-devel \
10+ glibc-static \
11+ go \
12+ golang-github-cpuguy83-go-md2man \
13+ gpgme-devel \
14+ libassuan-devel \
15+ libgpg-error-devel \
16+ libseccomp-devel \
17+ libselinux-devel \
18+ ostree-devel \
19+ pkgconfig \
20+ make \
21+ skopeo-containers \
22+ # start runtime deps
23+ runc \
24+ socat \
25+ iproute \
26+ iptables && \
27+ # end runtime deps
28+ yum clean all
29+
30+ ENV CRIO_PR ""
31+ ENV CRIO_COMMIT release-1.7
32+ RUN set -x \
33+ && export GOPATH="$(mktemp -d)" \
34+ && git clone https://github.com/kubernetes-incubator/cri-o.git "$GOPATH/src/github.com/kubernetes-incubator/cri-o" \
35+ && cd "$GOPATH/src/github.com/kubernetes-incubator/cri-o" \
36+ && if [[ -n "$CRIO_PR" ]]; then git fetch origin "pull/$CRIO_PR/head:pr$CRIO_PR" && git checkout "pr$CRIO_PR" ; else git checkout -q "$CRIO_COMMIT" ; fi \
37+ && make binaries docs \
38+ && ./bin/crio --selinux=true --storage-driver=overlay --conmon /usr/libexec/crio/conmon --cni-plugin-dir /usr/libexec/cni --default-mounts /usr/share/rhel/secrets:/run/secrets --cgroup-manager=systemd config > crio.conf \
39+ && make install.config install.systemd PREFIX=/usr \
40+ && make install PREFIX=/usr \
41+ && rm -rf "$GOPATH"
42+
43+ RUN mkdir -p /exports/hostfs/etc/crio /exports/hostfs/opt/cni/bin/ /exports/hostfs/var/lib/containers/storage/ && \
44+ cp /etc/crio/* /exports/hostfs/etc/crio && \
45+ if test -e /usr/libexec/cni; then cp -Lr /usr/libexec/cni/* /exports/hostfs/opt/cni/bin/; fi
46+
47+ RUN sed -i '/storage_option =/s/.*/&\n "overlay.override_kernel_check=1",/' /exports/hostfs/etc/crio/crio.conf
48+
49+ COPY manifest.json tmpfiles.template config.json.template service.template /exports/
50+
51+ COPY set_mounts.sh /
52+ COPY run.sh /usr/bin/
53+
54+ CMD ["/usr/bin/run.sh" ]
Original file line number Diff line number Diff line change 1+ # cri-o
2+
3+ This is the cri-o daemon as a system container.
4+
5+ ## Building the image from source:
6+
7+ ```
8+ # git clone https://github.com/kubernetes-incubator/cri-o
9+ # cd contrib/test/system-container
10+ # docker build -t cri-o .
11+ ```
12+
13+ ## Running the system container, with the atomic CLI:
14+
15+ Pull from registry into ostree:
16+
17+ ```
18+ # atomic pull --storage ostree $REGISTRY/cri-o
19+ ```
20+
21+ Or alternatively, pull from local docker:
22+
23+ ```
24+ # atomic pull --storage ostree docker:cri-o:latest
25+ ```
26+
27+ Install the container:
28+
29+ Currently we recommend using --system-package=no to avoid having rpmbuild create an rpm file
30+ during installation. This flag will tell the atomic CLI to fall back to copying files to the
31+ host instead.
32+
33+ ```
34+ # atomic install --system --system-package=no --name=crio ($REGISTRY)/cri-o
35+ ```
36+
37+ Start as a systemd service:
38+
39+ ```
40+ # systemctl start crio
41+ ```
42+
43+ Stopping the service
44+
45+ ```
46+ # systemctl stop crio
47+ ```
48+
49+ Removing the container
50+
51+ ```
52+ # atomic uninstall crio
53+ ```
54+
55+ ## Binary version
56+
57+ You can find the image automatically built as: docker.io/crio/cri-o
You can’t perform that action at this time.
0 commit comments