forked from tfutils/tfenv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request tfutils#346 from OJFord/impl-241
Add a dockerfile, end-to-end sanity test
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
ARG BASH_VERSION=5 | ||
FROM "docker.io/bash:${BASH_VERSION}" | ||
|
||
# Runtime dependencies | ||
RUN apk add --no-cache --purge \ | ||
curl \ | ||
; | ||
|
||
ARG TFENV_VERSION=3.0.0 | ||
RUN wget -O /tmp/tfenv.tar.gz "https://github.com/tfutils/tfenv/archive/refs/tags/v${TFENV_VERSION}.tar.gz" \ | ||
&& tar -C /tmp -xf /tmp/tfenv.tar.gz \ | ||
&& mv "/tmp/tfenv-${TFENV_VERSION}/bin"/* /usr/local/bin/ \ | ||
&& mkdir -p /usr/local/lib/tfenv \ | ||
&& mv "/tmp/tfenv-${TFENV_VERSION}/lib" /usr/local/lib/tfenv/ \ | ||
&& mv "/tmp/tfenv-${TFENV_VERSION}/libexec" /usr/local/lib/tfenv/ \ | ||
&& mkdir -p /usr/local/share/licenses \ | ||
&& mv "/tmp/tfenv-${TFENV_VERSION}/LICENSE" /usr/local/share/licenses/tfenv \ | ||
&& rm -rf /tmp/tfenv* \ | ||
; | ||
ENV TFENV_ROOT /usr/local/lib/tfenv | ||
|
||
ENV TFENV_CONFIG_DIR /var/tfenv | ||
VOLUME /var/tfenv | ||
|
||
# Default to latest; user-specifiable | ||
ENV TFENV_TERRAFORM_VERSION latest | ||
ENTRYPOINT ["/usr/local/bin/terraform"] |