Fixing Issues for the Ubuntu Builds in Docker#16
Fixing Issues for the Ubuntu Builds in Docker#16rainmanh wants to merge 2 commits intoopenvstorage:devfrom
Conversation
c53e33d to
3ff68bb
Compare
|
+1 |
docker/ubuntu1604/Dockerfile
Outdated
| libxio-dev libxio-dev-dbgsym && \ | ||
| apt-get install -y libev4 && \ | ||
| cd /root && apt-get download --allow-unauthenticated arakoon && \ | ||
| cd /tmp && apt-get download --allow-unauthenticated arakoon && \ |
There was a problem hiding this comment.
/tmp is shared between all builds on the internal build system, so better not use it. The downloaded deb is removed a couple of lines further, so nothing is left behind.
There was a problem hiding this comment.
@dejonghb , there is a bug in Xenial (ubuntu 16.04 ) permissions related and using root as a download directory does not work.
id you do not like tmp , it would be better to allocate some other tmp directory.
There was a problem hiding this comment.
No problem to use something else than /root. The problem is the jenkins builds share /tmp on the buildslave so either create a unique directory in /tmp first and use that (and cleanup further on) or use something else inside the container if /root does not work.
docker/ubuntu1604/Dockerfile
Outdated
| ADD docker-entrypoint.sh /sbin/docker-entrypoint.sh | ||
|
|
||
| ENTRYPOINT ["/sbin/docker-entrypoint.sh"] | ||
| #ENTRYPOINT ["/sbin/docker-entrypoint.sh"] |
There was a problem hiding this comment.
Again this is needed for the internal build system, so it needs to be kept in here.
| ##apt-get install -qq -y alba arakoon | ||
|
|
||
| # finally execute the command the user requested | ||
| exec "$@" |
48ef066 to
f4c4071
Compare
f4c4071 to
98d8d6e
Compare
|
| echo "jenkins ALL=NOPASSWD: ALL" >/etc/sudoers.d/jenkins | ||
|
|
||
| #Creating TMP Directoy To Avoid permission Issues -- Bug in Xenial | ||
| RUN mkdir /opt/tmp_docker; chmod -R 777 /opt/tmp_docker |
There was a problem hiding this comment.
don't make this an extra step (layer) but create the directory below (around line 55) where it's used (and cleanup afterwards)
| libxio-dev libxio-dev-dbgsym && \ | ||
| apt-get install -y libev4 && \ | ||
| cd /root && apt-get download --allow-unauthenticated arakoon && \ | ||
| cd /opt/tmp_docker && apt-get download --allow-unauthenticated arakoon && \ |
There was a problem hiding this comment.
see above: mkdir /opt/tmp_docker && cd /opt/tmp_docker && apt-get download...
There was a problem hiding this comment.
to check: is an apt-get install arakoon not possible these days instead of the download/install sequence hack?
| cd /opt/tmp_docker && apt-get download --allow-unauthenticated arakoon && \ | ||
| dpkg -i --ignore-depends=libgflags2,libsnappy1 arakoon_*_amd64.deb && \ | ||
| #chown _apt arakoon_*_amd64.deb && \ | ||
| rm arakoon_*_amd64.deb && \ |
There was a problem hiding this comment.
"rm -rf /opt/tmp_docker" to clean-up
| [ -d /home/jenkins/.ssh ] && chown ${UID} /home/jenkins/.ssh | ||
| fi | ||
|
|
||
| # update alba & arakoon packages to latest/greatest |
There was a problem hiding this comment.
keep this the same as for 14.04 (couldn't do this at the time this Dockerfile was created)
| # To preserve the logs for redis | ||
| RUN chown -R redis:redis /var/log/redis/ | ||
|
|
||
| # Cleaning behind |
There was a problem hiding this comment.
not needed if /opt/tmp_docker is cleaned up after use
| RUN sed -i "s/daemonize yes/daemonize no/g" /etc/redis/redis.conf | ||
|
|
||
| # To preserve the logs for redis | ||
| RUN chown -R redis:redis /var/log/redis/ |
There was a problem hiding this comment.
add to RUN above to avoid extra docker layer; these 2 are redis customisations that go together anyway
(even better to move those 2 steps into the whole install step above)
Uh oh!
There was an error while loading. Please reload this page.