-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle custom invocation images without #PORTER_INIT (#2998)
* Handle custom Dockerfile without PORTER_INIT The documentation says that if the PORTER_INIT section is missing on the custom dockerfile, it will be placed right after the FROM section. This was not the case, instead it was place at the end of the file, resulting in a dockerfile not working with Porter Signed-off-by: Kim Christensen <kimworking@gmail.com> --------- Signed-off-by: Kim Christensen <kimworking@gmail.com>
- Loading branch information
1 parent
7001782
commit f0a68b3
Showing
5 changed files
with
54 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
pkg/build/testdata/custom-dockerfile-without-init-expected-output.Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# syntax=docker/dockerfile-upstream:1.4.0 | ||
FROM ubuntu:latest | ||
ARG BUNDLE_DIR | ||
ARG BUNDLE_UID=65532 | ||
ARG BUNDLE_USER=nonroot | ||
ARG BUNDLE_GID=0 | ||
RUN useradd ${BUNDLE_USER} -m -u ${BUNDLE_UID} -g ${BUNDLE_GID} -o | ||
# stuff | ||
COPY mybin /cnab/app/ | ||
|
||
# exec mixin has no buildtime dependencies | ||
|
||
RUN rm ${BUNDLE_DIR}/porter.yaml | ||
RUN rm -fr ${BUNDLE_DIR}/.cnab | ||
COPY --link .cnab /cnab | ||
RUN chgrp -R ${BUNDLE_GID} /cnab && chmod -R g=u /cnab | ||
USER ${BUNDLE_UID} | ||
WORKDIR ${BUNDLE_DIR} | ||
CMD ["/cnab/app/run"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
pkg/build/testdata/missing-mixins-token-expected-output.Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters