I have built docker container system where container contains a command line application. I pass arguments and run the application using docker exec command from another application.
When I run the command line application from inside docker, it takes 0.003s to run.
$ time comlineapp "hello"
But when I run it from outside docker using docker exec, it takes 0.500s
$ time docker exec comline app "hello"
So clearly docker exec takes lot of time. We need any help to reduce the time as much as possible for docker exec command.
Here is the docker file
FROM ubuntu:18.04
RUN adduser --disabled-password --gecos "" newuser
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get -y install time && \
apt-get -y install gcc mono-mcs && \
apt-get install pmccabe && \
rm -rf /var/lib/apt/lists/*
all required softwares are already installed.