Skip to content

Instantly share code, notes, and snippets.

@AlexanderMint
Created November 18, 2023 23:14
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 AlexanderMint/afc2688e0bbd599e047b3b8cf89aa4ca to your computer and use it in GitHub Desktop.
Save AlexanderMint/afc2688e0bbd599e047b3b8cf89aa4ca to your computer and use it in GitHub Desktop.
Compile and install any version via brew
ARG BREW_VERSION=latest
ARG GOOSE_VERSION='v3.16.0'
FROM homebrew/brew:${BREW_VERSION} AS brew
ENV HOMEBREW_NO_AUTO_UPDATE=1
RUN git config --global user.name "build"
RUN git config --global user.email "build@docker.com"
RUN brew update
ARG GOOSE_VERSION
RUN brew tap pressly/goose
RUN brew extract --version ${GOOSE_VERSION} goose pressly/goose
RUN brew install pressly/goose/goose@${GOOSE_VERSION}
RUN cp $(brew --prefix)/bin/goose@${GOOSE_VERSION} ~/goose
FROM scratch AS bin
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment