Skip to content

Instantly share code, notes, and snippets.

diff --git a/server/container_create.go b/server/container_create.go
index 06c172d..da120b4 100644
--- a/server/container_create.go
+++ b/server/container_create.go
@@ -15,6 +15,7 @@ import (
"github.com/kubernetes-incubator/cri-o/server/seccomp"
"github.com/opencontainers/runc/libcontainer/label"
"github.com/opencontainers/runtime-tools/generate"
+ "github.com/opencontainers/image-spec/specs-go/v1"
"golang.org/x/net/context"
diff --git a/server/container_create.go b/server/container_create.go
index 06c172d..86b8758 100644
--- a/server/container_create.go
+++ b/server/container_create.go
@@ -15,6 +15,7 @@ import (
"github.com/kubernetes-incubator/cri-o/server/seccomp"
"github.com/opencontainers/runc/libcontainer/label"
"github.com/opencontainers/runtime-tools/generate"
+ "github.com/opencontainers/image-spec/specs-go/v1"
"golang.org/x/net/context"
diff --git a/proxy/vm.go b/proxy/vm.go
index 01c3de9..cff59d3 100644
--- a/proxy/vm.go
+++ b/proxy/vm.go
@@ -16,7 +16,7 @@ package main
import (
"bufio"
- "encoding/hex"
+// "encoding/hex"
# The "ocid" table contains all of the server options.
[ocid]
# root is a path to the "root directory". OCID stores all of its data,
# including container images, in this directory.
root = "/var/lib/ocid"
# run is a path to the "run directory". OCID stores all of its state
# in this directory.
runroot = "/var/run/containers"

Create an nginx pod:

kubectl run nginx --image=nginx --port=80 --replicas=3
kubectl expose deployment nginx --port=80 
kubectl run busybox-fail --rm -ti --image=busybox /bin/sh
kubectl run busybox --image=busybox --command -- sleep 600
kubectl expose deployment my-nginx --port=80 --type=NodePort
kubectl get svc
kubectl describe service my-nginx
diff --git a/server/container_create.go b/server/container_create.go
index 7834e88..608cade 100644
--- a/server/container_create.go
+++ b/server/container_create.go
@@ -71,23 +71,8 @@ func buildOCIProcessArgs(containerKubeConfig *pb.ContainerConfig, imageOCIConfig
kubeArgs := containerKubeConfig.Args
if imageOCIConfig == nil {
- // HACK We should error out here, not being able to get an Image config is fatal.
- // When https://github.com/kubernetes-incubator/cri-o/issues/395 is fixed
diff --git a/cmd/ocic/container.go b/cmd/ocic/container.go
index e4fe4cd..57c575f 100644
--- a/cmd/ocic/container.go
+++ b/cmd/ocic/container.go
@@ -1,14 +1,19 @@
package main
import (
+ "bufio"
"fmt"
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: flannel
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:

Clone OpenShift

mkdir -p $GOPATH/src/github.com/openshift
cd $GOPATH/src/github.com/openshift/
git clone git://github.com/sameo/origin

Build OpenShift

#!/bin/bash
printf "Clearing COR logs..."
rm -rf /var/run/cc-oci-runtime/cc-oci-runtime.log
printf "Done\n"
printf "Killing all Docker containers..."
docker rm -f $(sudo docker ps -a -q) 2> /dev/null
printf "Done\n"