Skip to content

Container Requirements

Rafael Schellenberg edited this page Oct 27, 2019 · 1 revision

Containers that should be executed within the emulator need to fulfill the following requirements:

  • ifconfig installed (e.g., Ubuntu net-tools package)
  • ip installed (e.g., Ubuntu iproute package)

The container should not have an entrypoint that blocks e.g. that directly starts a server process. This would break Containernet's runtime configuration mechanisms. The process that should be started after the emulator has configured everything can be defined by a new entry point, as follows (used if service is deployed through dummy gatekeeper):

ENV VIM_EMU_CMD ./my_start_command
ENV VIM_EMU_CMD_STOP ./my_stop_command

Example

A minimalistic example Docker file:

FROM ubuntu:xenial
MAINTAINER [email protected]

RUN	apt-get update && apt-get install -y \
	net-tools \
        iputils-ping \
	iproute

# set entry point for emulator gatekeeper
ENV VIM_EMU_CMD "echo 'Hello World!'"
ENV VIM_EMU_CMD_STOP "echo 'Stopping the container now.'"

# CMD should always point to /bin/bash to not block the emulator
CMD /bin/bash
Clone this wiki locally