Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile commands to implement #1

Closed
27 of 30 tasks
priyawadhwa opened this issue Feb 13, 2018 · 0 comments
Closed
27 of 30 tasks

Dockerfile commands to implement #1

priyawadhwa opened this issue Feb 13, 2018 · 0 comments

Comments

@priyawadhwa
Copy link
Collaborator

priyawadhwa commented Feb 13, 2018

FROM

  • Add support for ARG with FROM

RUN

  • Run command in shell form -- RUN , default prefixed by "sh -c"
  • Run command in exec form
  • Change default shell for RUN command with the SHELL command

CMD

  • CMD in exec form
  • CMD as default parameters to entrypoint
  • CMD in shell form, default prefixed by "sh -c"
  • If multiple CMD calls in Dockerfile, only the last should be run

LABEL

  • Adds metadata to image (labels are inherited by parent/base images)

EXPOSE

  • Expose a port

ENV

  • Set environment variables as <key>:<value> pairs in image

ADD
Add has two forms:

  • ADD [--chown=<user>:<group>] <src>... <dest>

  • ADD [--chown=<user>:<group>] ["<src>",... "<dest>"]

  • Copy new files, directories, or remote URLs from <src> to the <dest>

  • Multiple sources may be specified, their paths are interpreted as relative to the context of the build

  • Support for any <src> to contain wildcards

  • <dest> is absolute path, or relative to WORKDIR command

  • Specify UID/GID with --chown flag

  • If <src> is local tar archive, it is unpacked to destination directory

COPY
COPY has two forms:
-COPY [--chown=<user>:<group>] <src>... <dest>
-COPY [--chown=<user>:<group>] ["<src>",... "<dest>"]

  • Allow copy from multiple sources to destination
  • Add support for wildcards in <src>
  • Specify UID/GID with --chown flag
  • Set source location to previous build stage with --from flag

ENTRYPOINT

  • Set entrypoint in exec and shell form

VOLUME

  • Create a mount point and mark it as holding externally mounted volumes

USER

  • Set UID/GID

WORKDIR

  • Set working directory

ARG

  • Implement ARG

ONBUILD

  • Add trigger to metadata of the image, under the key OnBuild

STOPSIGNAL

  • Implement stopsignal

HEALTHCHECK

  • Implement healthcheck

SHELL

  • Override default shell, can effect RUN/CMD/ENTRYPOINT commands
@dlorenc dlorenc closed this as completed May 21, 2018
priyawadhwa referenced this issue in priyawadhwa/kaniko Jun 26, 2018
tejal29 pushed a commit that referenced this issue Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants