Skip to content

Instantly share code, notes, and snippets.

@mikeslattery
Last active February 19, 2021 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeslattery/8cd7ebd9f0d0d9387bc2d36590dd9aab to your computer and use it in GitHub Desktop.
Save mikeslattery/8cd7ebd9f0d0d9387bc2d36590dd9aab to your computer and use it in GitHub Desktop.
Mock Dockerfile syntax for local testing
alias FROM='docker run -it --rm'
ADD() { curl -sLf "$1" -o "$2"; }
alias RUN='' ARG='' ENV='' CMD=''
alias LABEL=: EXPOSE=: ENTRYPOINT=: VOLUME=: ONBUILD=: STOPSIGNAL=: HEALTHCHECK=: SHELL=:
SHELL() { eval "export SHELL=$1"; }
alias WORKDIR=cd
USER() { sudo -u "$1" bash --init-file fake_dockerfile.sh; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment