cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2694
Views
0
Helpful
8
Replies

Docker containers and Base Images

amgfog
Level 1
Level 1

I successfully deployed a test docker container based on the instructions from the lab Building an IOx Application with Docker

 

I then attempted to change the lab, to use ubuntu:18.04 as my base image rather than "alpine:3.5".

 

I was able to package, install, and activate the application. However, I received an error when trying to start the application:

 

Error while starting the app: ubuntutest, Cause: Failed to start container: Error: internal error: guest failed to start: /usr/libexec/libvirt_lxc: relocation error: /lib/x86_64-linux-gnu/libnss_dns.so.2: symbol __resolv_context_get, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference

I would like to know:

  1. is ubuntu:18.04 a supported base image?
  2. is alpine linux the only supported base image? 

Code...

 

 

 

Dockerfile

 

FROM ubuntu:18.04

RUN apt -y update && \
    apt -y install python3 \
    python3-pip && pip3 install bottle
EXPOSE 8000
COPY main.py /main.py
CMD python3 /main.py

main.py

 

from bottle import route, run
from datetime import datetime

@route('/status/<device_id>')
def status(device_id):
   return { "system": 1, "device": str(device_id) }

@route('/time')
def time():
   current_time = datetime.now().isoformat(' ')
   return {"system": 1, "datetime": current_time}

run(host='0.0.0.0', port=8000)

package.yaml

 

 

descriptor-schema-version: "2.2"

info:
 name: iox_docker_python_ll
 description: "IOx Docker Python Web Learning Lab Application"
 version: "1.0"
 author-link: "http://www.cisco.com"
 author-name: "Cisco Systems"

app:
 cpuarch: "x86_64"
 type: docker
 resources:
   profile: c1.small
   network:
     -
       interface-name: eth0
       ports:
         tcp:
           - 8000

 startup:
   rootfs: rootfs.tar
   target: ["python3 main.py"]

activation.json

 

 

{
 "resources": {
     "profile": "c1.small",
     "network": [{
         "interface-name": "eth0",
         "network-name": "iox-nat0",
         "port_map": {
             "mode": "auto",
             "tcp": {
                 "8000": "8000"
             }
         }
     }]
 }
}

 

 

8 Replies 8

suressan
Cisco Employee
Cisco Employee

Thanks for reporting this issue. Will get back to you on this soon.

 

Is there any reason you specifically need 18.04 Ubuntu base image ? We did verify with 16.04 Ubuntu rootfs and it works fine.

Thanks for the prompt reply. 

 

Ubuntu 16.04 is perfectly fine. I will continue my testing using 16.04.

I have the same problem while trying to run an image which is built on 18.04. However, I can't use 16.04. Do you know when will 18.04 be supported by iox.

 

Best regards,

Gabrijel

@gabrijels 

Which iox platform are you planning to run ubuntu 18.04 container?

We are not  seeing this issue in IR829. 

@suressan I tried to deploy it in the iox sandbox lab, running the iox version 1.7.0.7. 

 

However, I am currently working with IR809. My plan was to deploy it there as well.

Could you please try deploying it on 809 and let us know if you still facing same error?

Will look into sandbox issue in parallel.

Hi,

 

I uploaded a docker application with Ubuntu 18.04 and its seems to be running fine. Any change regarding the sandbox issue?

 

Cheers,

G.

We will be publishing new version of sandbox where this is issue would be addressed. Will let you know the timeline on new sandbox version soon.