Ensure 'ENTRYPOINT' and 'CMD' arguments using a valid JSON values
ENTRYPOINT has two forms:
The exec form, which is the preferred form:
ENTRYPOINT ["executable", "param1", "param2"]
The shell form:
ENTRYPOINT command param1 param2
Risk Level: medium
Platform: Docker
Spectral Rule ID: DOCKR034
REMEDIATION
make sure ENTRYPOINT
and CMD
get valid JSON.
FROM alpine:3.5
RUN apk add --update py2-pip
RUN sudo yum install bundler
RUN yum install
COPY requirements.txt /usr/src/app/
RUN pip install --no-cache-dir -r /usr/src/app/requirements.txt
COPY app.py /usr/src/app/
COPY templates/index.html /usr/src/app/templates/
EXPOSE 5000
- CMD [python, /usr/src/app/app.py]
+ CMD ["python", "/usr/src/app/app.py"]
- ENTRYPOINT [top, -b]
+ ENTRYPOINT ["top", "-b"]
Read more:
Updated over 1 year ago