deis / dockerbuilder

Deis dockerbuilder builds your app from a Dockerfile inside a Kubernetes pod, used by Deis Workflow.
https://deis.com
MIT License
17 stars 27 forks source link

Builder behaviour differs from Deis 1 #106

Closed ineu closed 7 years ago

ineu commented 7 years ago

I'm using Dockerfile-based deployment in conjuction with Heroku buildpacks. For this purpose I've made my own docker image from the https://github.com/progrium/buildstep. This allows me to run some code with root permissions and then use buildpacks logic for auto-detection. My Dockerfile is as follows (for PHP app):

FROM ineu/buildstep

# Install package with add-apt-repository binary and other needed packages
RUN apt-get update && apt-get install -y software-properties-common unoconv

# Install ffmpeg from the remote repo
RUN add-apt-repository ppa:mc3man/trusty-media && apt-get update && apt-get -y install ffmpeg

ADD . /app
RUN /build/builder

ENV PORT 5000
EXPOSE 5000

CMD ["/start", "web"]

It works great in Deis 1.13. When I try to push the same revision to Deis 2.8, I receive following error:

-----> Preparing runtime environment...
-----> Checking for additional extensions to install...
rm: cannot remove '/app/app/Generator/Abstracts': Directory not emptyrm: cannot remove '/app/app/Generator/Actions': Directory not emptyrm: cannot remove '/app/app/Generator/Interfaces': Directory not emptyrm: cannot remove '/app/app/Generator/Objects/Converters': Directory not emptyrm: cannot remove '/app/app/Generator/Objects/Generators': Directory not emptyrm: cannot remove '/app/app/Resource': Directory not emptyrm: cannot remove '/app/app/config': Directory not emptyrm: cannot remove '/app/tests/Resource': Directory not emptyrm: cannot remove '/app/tests/data': Directory not emptyrm: cannot remove '/app/tmp/images': Directory not empty
The command '/bin/sh -c /build/builder' returned a non-zero code: 1

Are there some known changes in Deis Workflow's dockerbuilder that should be taken into account to migrate Dockerfiles to the new Deis?

bacongobbler commented 7 years ago

The process is the exact same as it was in v1. We take a Dockerfile from the root of the app and build the image.

From the logs it looks like this the application code running inside the container from the RUN /build/builder step. I'd imagine this app would also fail outside of dockerbuilder if you ran docker build . locally.

Can you display the full logs from the build, and perhaps provide a sample app that demonstrates this behaviour?

bacongobbler commented 7 years ago

ping

ineu commented 7 years ago

@bacongobbler I have changed the build approach since this ticket was opened, but will try to reproduce

ineu commented 7 years ago

@bacongobbler Actually I cannot reproduce it any longer on the cluster with Deis Workflow 2.10 and Kubernetes 1.5. I had the error on DW 2.8 and Kubernetes 1.2. I believe this one can be closed.