{"action":"created","issue":{"url":"https://api.github.com/repos/zokradonh/kopano-docker/issues/34","repository_url":"https://api.github.com/repos/zokradonh/kopano-docker","labels_url":"https://api.github.com/repos/zokradonh/kopano-docker/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/zokradonh/kopano-docker/issues/34/comments","events_url":"https://api.github.com/repos/zokradonh/kopano-docker/issues/34/events","html_url":"https://github.com/zokradonh/kopano-docker/issues/34","id":384087865,"node_id":"MDU6SXNzdWUzODQwODc4NjU=","number":34,"title":"Replacing base-image with multi-stage build","user":{"login":"nupplaphil","id":379654,"node_id":"MDQ6VXNlcjM3OTY1NA==","avatar_url":"https://avatars3.githubusercontent.com/u/379654?v=4","gravatar_id":"","url":"https://api.github.com/users/nupplaphil","html_url":"https://github.com/nupplaphil","followers_url":"https://api.github.com/users/nupplaphil/followers","following_url":"https://api.github.com/users/nupplaphil/following{/other_user}","gists_url":"https://api.github.com/users/nupplaphil/gists{/gist_id}","starred_url":"https://api.github.com/users/nupplaphil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nupplaphil/subscriptions","organizations_url":"https://api.github.com/users/nupplaphil/orgs","repos_url":"https://api.github.com/users/nupplaphil/repos","events_url":"https://api.github.com/users/nupplaphil/events{/privacy}","received_events_url":"https://api.github.com/users/nupplaphil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-25T15:11:58Z","updated_at":"2018-11-25T15:32:21Z","closed_at":null,"author_association":"NONE","body":"As far as I can see, we use https://github.com/zokradonh/kopano-docker/tree/master/base because of the necessary https://github.com/zokradonh/kopano-docker/blob/master/base/create-kopano-repo.sh file, which we are just using during the docker creation of the other images.\r\n\r\nI'd rather suggest to create something like a multi-stage build (f.e. https://github.com/nupplaphil/kopano-ldap/blob/master/Dockerfile )\r\n\r\n=> https://docs.docker.com/develop/develop-images/multistage-build/\r\n\r\n- using/creating a builder for getting the right image ( = current `base` image) \r\n- inject the builder into the productive images (= `webapp` , `core` ) and copying the images\r\n\r\nSo we don't have any build-requiremented functions inside the productive image."},"comment":{"url":"https://api.github.com/repos/zokradonh/kopano-docker/issues/comments/441448970","html_url":"https://github.com/zokradonh/kopano-docker/issues/34#issuecomment-441448970","issue_url":"https://api.github.com/repos/zokradonh/kopano-docker/issues/34","id":441448970,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTQ0ODk3MA==","user":{"login":"nupplaphil","id":379654,"node_id":"MDQ6VXNlcjM3OTY1NA==","avatar_url":"https://avatars3.githubusercontent.com/u/379654?v=4","gravatar_id":"","url":"https://api.github.com/users/nupplaphil","html_url":"https://github.com/nupplaphil","followers_url":"https://api.github.com/users/nupplaphil/followers","following_url":"https://api.github.com/users/nupplaphil/following{/other_user}","gists_url":"https://api.github.com/users/nupplaphil/gists{/gist_id}","starred_url":"https://api.github.com/users/nupplaphil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nupplaphil/subscriptions","organizations_url":"https://api.github.com/users/nupplaphil/orgs","repos_url":"https://api.github.com/users/nupplaphil/repos","events_url":"https://api.github.com/users/nupplaphil/events{/privacy}","received_events_url":"https://api.github.com/users/nupplaphil/received_events","type":"User","site_admin":false},"created_at":"2018-11-25T15:32:21Z","updated_at":"2018-11-25T15:32:21Z","author_association":"NONE","body":"The base image will not change. It's more like that (pseudo-code):\r\n```Dockerfile\r\n# Stage 1\r\nFROM kopano:base AS builder\r\nRUN set -ex && \\\r\n       get_image_stuff_with_custom_functions()\r\n\r\n# Stage 2\r\nFROM ubuntu:latest\r\nCOPY --from=builder /latest/downloaded/image /kopano\r\n```"}}
{"actor":{"display_login":"nupplaphil"}}