{"id":7442,"date":"2016-04-27T07:38:15","date_gmt":"2016-04-27T07:38:15","guid":{"rendered":"https:\/\/www.viafirma.com\/blog-xnoccio\/?p=7442"},"modified":"2026-01-20T13:31:31","modified_gmt":"2026-01-20T13:31:31","slug":"ubuntu-docker-no-funciona","status":"publish","type":"post","link":"https:\/\/www.viafirma.com\/es\/ubuntu-docker-no-funciona\/","title":{"rendered":"Ubuntu: Docker no funciona (Error response from daemon: rpc error: code = 2 desc = \u00aboci runtime error: exit status 1\u00bb)"},"content":{"rendered":"<p style=\"text-align: center;\"><i><span style=\"font-weight: 400;\">Hoy desde Viafirma hablamos de Docker, una alternativa cuanto menos interesante a la virtualizaci\u00f3n de sistemas operativos y te ense\u00f1amos c\u00f3mo solucionar el siguiente error: <em>Error response from daemon- rpc error- code = 2 desc = -oci runtime error- exit status 1-. \u00bfEst\u00e1s listo? Empezamos. <\/em><\/span><\/i><\/p>\n<p><!--more--><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Como dec\u00edamos, se ha convertido en una interesante alternativa a la virtualizaci\u00f3n de sistemas operativos, ya que su filosof\u00eda se basa en desplegar \u00abcontenedores\u00bb que comparten recursos con el sistema anfitri\u00f3n en lugar de instalar un S.O. completo:<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Esta filosof\u00eda se traduce en un menor consumo de recursos, por lo que es posible desplegar m\u00faltiples contenedores en un mismo sistema anfitri\u00f3n reduciendo notablemente la carga que ello supone para \u00e9l mismo. En cierto modo la soluci\u00f3n es muy ingeniosa, puesto que evita la redundancia: <em>\u00bfpor qu\u00e9 replicar varias veces los mismos recursos si puedo compartirlos?<\/em><br \/>\n<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Me convence la idea, vamos a probarlo en mi equipo (Ubuntu 12.04).<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">A primera vista, la instalaci\u00f3n, siguiendo los pasos de la web es realmente simple, porque basta con ejecutar lo siguiente:<\/span><\/p>\n<p><code>$ curl -fsSL https:\/\/get.docker.com\/ | sh<\/code><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Hasta aqu\u00ed todo bien, pero como todo proceso (excesivamente) automatizado, cuando surgen problemas hay poco que puedas hacer. Llega el momento de probar tu instalaci\u00f3n con:<\/span><\/p>\n<p><code>$ docker run hello-world<\/code><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Y obtienes un bonito mensaje:<\/span><\/p>\n<p><code>Error response from daemon: rpc error: code = 2 desc = \"oci runtime error: exit status 1\"<\/code><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Zasca, en toda la boca. \u00bfC\u00f3mo puede ser si me he limitado a seguir el \u00fanico paso requerido para instalarse? Si buscamos por internet hay infinidad de respuestas, no parece haber consenso salvo en una cosa: docker no funciona con kernell 3.2 o inferior. Un primer paso, por tanto, ser\u00eda comprobar que tu kernel es superior. El problema llega cuando efectivamente lo es y \u00a1sigue sin funcionar! \u00bfQu\u00e9 est\u00e1 fallando aqu\u00ed?<\/span><\/p>\n<h3 style=\"text-align: justify;\">C\u00f3mo solucionar en Docker el: \u2018Error response from daemon- rpc error- code = 2 desc = -oci runtime error- exit status 1-\u2018<\/h3>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">La respuesta es simple: tu versi\u00f3n de SO\/kernell no se lleva bien con la versi\u00f3n instalada. La l\u00ednea m\u00e1gica de instalaci\u00f3n se limita a bajar la \u00faltima versi\u00f3n, pero si tu SO no est\u00e1 a la \u00faltima puede dar problemas (mismamente Ubuntu 12.04). \u00bfC\u00f3mo resolverlo? Bajando una versi\u00f3n anterior siguiendo estos pasos:<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Baja la key del repositorio:<\/span><\/p>\n<p><code>$ sudo apt-key adv --keyserver hkp:\/\/keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9<\/code><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Configura el repositorio:<\/span><\/p>\n<p><code>$ sudo sh -c \"echo deb https:\/\/get.docker.io\/ubuntu docker main &gt; \/etc\/apt\/sources.list.d\/docker.list\"<\/code><\/p>\n<p><code>$ sudo apt-get update<\/code><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Busca las versiones disponibles:<\/span><\/p>\n<p><code>$ sudo apt-cache search docker<\/code><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Instala la \u00faltima listada (en este caso 1.9.1):<\/span><\/p>\n<p><code>$ sudo apt-get install lxc-docker-1.9.1<\/code><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Permite la ejecuci\u00f3n con tu usuario actual:<\/span><\/p>\n<p><code>$ sudo usermod -aG docker tu_usuario<\/code><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Y a probar la instalaci\u00f3n:<\/span><\/p>\n<p><code>$ docker run hello-world<\/code><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Si todo ha ido bien, ahora s\u00ed nos recibir\u00e1 el mensaje que esper\u00e1bamos desde un principio:<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\"><i><span style=\"color: #0000ff;\">Hello from Docker.<\/span><\/i><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\"><i><span style=\"color: #0000ff;\">This message shows that your installation appears to be working correctly.<\/span><\/i><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Es importante tener en cuenta que estos pasos se han seguido sobre un Ubuntu 12.04.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">Esperamos que la informaci\u00f3n te sea \u00fatil y si tienes cualquier duda, ponte en contacto con nosotros.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-weight: 400;\">\u00a1Volvemos la semana que viene!<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><div class=\"vf_related_posts_wrapper\"><h2 class=\"vf_related_posts_title\">Informaci\u00f3n relacionada<\/h2><div class=\"vf_related_posts\"><article class=\"vc_gitem-post-data-source-post\"><a href=\"https:\/\/www.viafirma.com\/es\/detectar-a-bajo-nivel-si-un-fichero-es-utf-8-desde-java\/\" class=\"vc_gitem-post-link\"><div class=\"vc_gitem-post-image\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"350\" src=\"https:\/\/www.viafirma.com\/wp-content\/uploads\/2007\/12\/java-768x350.webp\" class=\" wp-post-image\" alt=\"Detectar a bajo nivel si un fichero es UTF-8 desde Java\" srcset=\"https:\/\/www.viafirma.com\/wp-content\/uploads\/2007\/12\/java-768x350.webp 768w, https:\/\/www.viafirma.com\/wp-content\/uploads\/2007\/12\/java-300x137.webp 300w, https:\/\/www.viafirma.com\/wp-content\/uploads\/2007\/12\/java-jpg.webp 1000w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/div><\/a><div class=\"vc_gitem-post-data\"><h3 class=\"vc_gitem-post-data-source-post_title\"><a href=\"https:\/\/www.viafirma.com\/es\/detectar-a-bajo-nivel-si-un-fichero-es-utf-8-desde-java\/\">Detectar a bajo nivel si un fichero es UTF-8 desde Java<\/a><\/h3><p class=\"vc_gitem-post-data-source-post_excerpt\">Detecta archivos UTF-8 desde Java<\/p><\/div><\/article><article class=\"vc_gitem-post-data-source-post\"><a href=\"https:\/\/www.viafirma.com\/es\/implementacion-de-la-formula-haversine-en-java\/\" class=\"vc_gitem-post-link\"><div class=\"vc_gitem-post-image\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"341\" src=\"https:\/\/www.viafirma.com\/wp-content\/uploads\/2008\/11\/java_haversine-768x341.webp\" class=\" wp-post-image\" alt=\"Implementaci\u00f3n de la f\u00f3rmula Haversine en Java\" srcset=\"https:\/\/www.viafirma.com\/wp-content\/uploads\/2008\/11\/java_haversine-768x341.webp 768w, https:\/\/www.viafirma.com\/wp-content\/uploads\/2008\/11\/java_haversine-300x133.webp 300w, https:\/\/www.viafirma.com\/wp-content\/uploads\/2008\/11\/java_haversine-jpg.webp 1000w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/div><\/a><div class=\"vc_gitem-post-data\"><h3 class=\"vc_gitem-post-data-source-post_title\"><a href=\"https:\/\/www.viafirma.com\/es\/implementacion-de-la-formula-haversine-en-java\/\">Implementaci\u00f3n de la f\u00f3rmula Haversine en Java<\/a><\/h3><p class=\"vc_gitem-post-data-source-post_excerpt\">Implementa la f\u00f3rmula Haversine en Java<\/p><\/div><\/article><\/div><\/div><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"Soluci\u00f3n al error Ubuntu: Docker no responde...","protected":false},"author":1,"featured_media":28850,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[41],"class_list":["post-7442","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-desarrollo"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.viafirma.com\/es\/wp-json\/wp\/v2\/posts\/7442","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.viafirma.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.viafirma.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.viafirma.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.viafirma.com\/es\/wp-json\/wp\/v2\/comments?post=7442"}],"version-history":[{"count":2,"href":"https:\/\/www.viafirma.com\/es\/wp-json\/wp\/v2\/posts\/7442\/revisions"}],"predecessor-version":[{"id":97344,"href":"https:\/\/www.viafirma.com\/es\/wp-json\/wp\/v2\/posts\/7442\/revisions\/97344"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.viafirma.com\/es\/wp-json\/wp\/v2\/media\/28850"}],"wp:attachment":[{"href":"https:\/\/www.viafirma.com\/es\/wp-json\/wp\/v2\/media?parent=7442"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.viafirma.com\/es\/wp-json\/wp\/v2\/categories?post=7442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}