Docker Image doesn't seem to work
Does anyone actually have this docker file working? I'm curious as to the changes needed. I've iterated over fixing errors for a few hours now and no-go.
Thanks,
CJ
Same issue but if you check Dockerfile, you can view this project is not finish ;)
`FROM ubuntu:16.04 # Install. RUN
sed -i 's/# (.multiverse$)/\1/g' /etc/apt/sources.list &&
apt-get update &&
apt-get -y upgrade &&
apt-get install -y build-essential &&
apt-get install -y software-properties-common &&
apt-get install -y byobu curl git htop man unzip vim wget &&
apt-get install -y ffmpeg &&
apt-get install -y python-pip python-dev &&
pip install --upgrade pip &&
rm -rf /var/lib/apt/lists/
Set environment variables. ENV HOME /root # Define working directory. WORKDIR /root
Define default command. CMD ["bash"]
ADD src/ ./src ADD config.json ./ ENTRYPOINT cd src && pip install -r requirements.txt && python start.py && /bin/bash`
This is why I asked to see if anyone had made progress.
Would rather not install a bunch of custom crap on my Mac. But if I must, I must.
The Dockerfile is indeed work in progress. It's something that I need to address, but it's lower priority compared to other work. For the time being, I am flagging it as good-first-issue and help-wanted if anyone wants to pick it up.
Dockerfile should look like
# Pull base image.
#FROM ubuntu:16.04
FROM python:3
# Install.
RUN \
sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
apt-get update && \
apt-get -y upgrade && \
apt-get install -y build-essential && \
apt-get install -y software-properties-common && \
apt-get install -y byobu curl git htop man unzip vim wget && \
apt-get install -y ffmpeg && \
apt-get install -y python-pip python-dev && \
pip install --upgrade pip && \
rm -rf /var/lib/apt/lists/*
ADD src/requirements.txt /root
RUN pip install -r /root/requirements.txt
# Set environment variables.
ENV HOME /root
# Define working directory.
WORKDIR /root
# Define default command.
CMD ["bash"]
ADD src/ ./src
ADD config.json ./
ENTRYPOINT cd src && python start.py && /bin/bash
@ldb2000 Awesome thank you.
Out of curiosity, why did you choose to set bash as the default command? Would you not want to start foggy cam instead of a shell?
CJ
@cjsfj , I am changing the Dockerfile with an alpine image (lighter). I will change also the entrypoint (CMD should not be necessary). I will do a merge request when I am ready (should be soon)
This image should be better. Light (alpine python image). removing CMD and bash (not needed). I have removed lots of unnecessary package (man, curl, ...) as well. The size of the image was 1.3G and now 331MB .
FROM python:alpine
# Install.
RUN \
apk add --update && \
apk add --no-cache build-base py-pip libffi-dev openssl-dev py-pip && \
pip install --upgrade pip && \
rm -rf /var/cache/apk/*
ADD ./src/ /apps/src
ADD ./config.json /apps/
RUN pip3 install -r /apps/src/requirements.txt
# Set environment variables.
ENV HOME /root
# Define working directory.
WORKDIR /apps/src
ENTRYPOINT ["python", "start.py"]
Need to be tested
@dend I have made a pull request.
Wanted to update you folks on this issue - I will actually be creating a new Docker image for the .NET implementation of this project. It needs to be updated from the previous version. My goal is to get this done in the coming month.