Answer the question
In order to leave comments, you need to log in
How to find the reason for the failure to launch your docker container?
Good evening,
I created a simple container based on the Linux distribution Alpine added a few docker build -t username/scaner:v0.1 .
utilities docker images
I
needed docker run -d MYIMAGEID sh
:
it is not active (ps), but it hangs in the list of stopped (ps -a). How to see all the logs at startup in order to understand what the problem is, below I give my config, maybe someone will immediately understand what the problem is.
2. I need to add my script written in Python to my image, but it is not on git, I think how to do it more competently, add a script and then just commit?
Dockerfile
# This is a comment
FROM mhart/alpine-node
MAINTAINER Kate Smith <[email protected]>
RUN apk update
RUN apk add nmap git
RUN git clone https://github.com/vulnersCom/nmap-vulners.git
RUN apk add --no-cache \
ca-certificates \
libpcap-dev
ENV MASSCAN_VERSION 1.0.5
RUN set -x \
&& apk add --no-cache --virtual .build-deps \
build-base \
clang \
clang-dev \
git \
linux-headers \
&& rm -rf /var/lib/apt/lists/* \
&& git clone --depth 1 --branch "$MASSCAN_VERSION" https://github.com/robertdavidgraham/masscan.git /usr/src/masscan \
&& ( \
cd /usr/src/masscan \
&& make \
&& make install \
) \
&& rm -rf /usr/src/masscan \
&& apk del .build-deps
Answer the question
In order to leave comments, you need to log in
1. The fact is that after starting, I see the id of the newly created container, but it is not in the list of active (ps), but it hangs in the list of stopped (ps -a). How to see all the logs at startup in order to understand what the problem is, below I give my config, maybe someone will immediately understand what the problem is.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question