Closed amoffat closed 7 years ago
what are we using LDAP for?
I was using docker-compose build
and docker-compose up
which seemed to work fine without the missing packages.
I solved this problem by replacing the apt-get source to another one and the chaos docker image was built successfully.
The idea is quite simple:
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
Save this file to the root path of your Chaos project
2. You need to modify the **Dockerfile**, Here is my dockerfile for example
FROM ubuntu:trusty
RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8
RUN rm -vf /var/lib/apt/lists/*
COPY sources.list /etc/apt/ # Move the file above into the docker image, the directory is fixed
RUN apt-get -y update
RUN apt-get -y install\ git\ mysql-server\ nginx\ python-software-properties\ software-properties-common\ supervisor\ curl
RUN add-apt-repository ppa:fkrull/deadsnakes RUN apt-get -y update
RUN apt-get -y install\ python3.6\
build-essential\
libpython3.6-dev\
libssl-dev\
libffi-dev
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.6 - RUN pip install virtualenv
ENV venvs=/root/.virtualenvs ENV venv=$venvs/chaos ENV chaosdir=/root/workspace/Chaos
RUN mkdir -p $chaosdir RUN mkdir $venvs RUN virtualenv $venv
ENV PATH="$venv/bin:$PATH"
WORKDIR $chaosdir
COPY requirements.txt . RUN pip install -r requirements.txt RUN rm requirements.txt
RUN rm /etc/nginx/sites-enabled/default
EXPOSE 80 8081
After those two step, you should be fine with apt-get.
Should I add a new wiki page for this problem?
The latest trusty image works fine. Changing this Docker line
FROM ubuntu:trusty
to
FROM ubuntu:trusty-20170602
Fixes the packages sources. It looks like the old version has security vulnerabilities, which is why it was updated. I would advise against replacing your sources list, especially to unknown servers.
@rudehn not sure about ldap. depenendency of a dependency I imagine
@amoffat Should we switch to xenial instead of trusty? or is that painful on the production env?
@mark-i-m it's a good idea. it would be a little painful to do manually on prod right now. what could be really cool is if we could run docker containers on prod, that way our dev and prod environments could be exactly the same, and we could upgrade/change OSes more easily
:+1: @amoffat That would be great! Is there anything blocking that?
The architecture isn't super clear yet I think. If we have to have a chaos container, what makes sure this container is restarted on a merge? Whatever is "outside" the container cannot be included in the container o_O Right now, we're able to test a full merge/restart/crash environment in our local devs at the expense of having the prod and dev envs not matching exactly.
@amoffat It might be a bit of a pain, but the repo could be split into two parts, chaos and supervisor. The supervisor would manage pulling from GitHub when needed, rebuilding the container, and then restarting it.
I'm down with that @PlasmaPower. If we went that direction, we could do away with puppet and ansible as well, since our system dependencies would be in the dockerfiles
@lmccccc, the issue is that your "apt-get update" and "apt-get install" commands are run as separate step. The first one (update) might get cached, while the second one (install) might not be if it changed. The build resumes after the update step, which could have been cached a long time ago.
If you combine the update and install steps into a single command, it could fix the issue.
anyone else seeing this on
./build.sh
?