Skip to content

Commit

Permalink
feat(docker): use latest TF version and update rovers default TF path
Browse files Browse the repository at this point in the history
  • Loading branch information
FalcoSuessgott committed Aug 18, 2023
1 parent 7867d7c commit 84608b6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/publishDockerImage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,4 @@ jobs:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args:
TF_VERSION=1.1.2
labels: ${{ steps.meta.outputs.labels }}
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Prep base stage
ARG TF_VERSION=light
ARG TF_VERSION=1.5.5

# Build ui
FROM node:20-alpine as ui
Expand Down Expand Up @@ -30,8 +30,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o rover .

# Release stage
FROM hashicorp/terraform:$TF_VERSION AS release
# Copy terraform binary to the rover's default terraform path
RUN cp /bin/terraform /usr/local/bin/terraform

# Copy rover binary
COPY --from=rover /src/rover /bin/rover
RUN chmod +x /bin/rover
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func main() {
var tfPath, workingDir, name, zipFileName, ipPort, planPath, planJSONPath, workspaceName, tfcOrgName, tfcWorkspaceName string
var standalone, genImage, showSensitive, getVersion, tfcNewRun bool
var tfVarsFiles, tfVars, tfBackendConfigs arrayFlags
flag.StringVar(&tfPath, "tfPath", "/usr/local/bin/terraform", "Path to Terraform binary")
flag.StringVar(&tfPath, "tfPath", "/bin/terraform", "Path to Terraform binary")
flag.StringVar(&workingDir, "workingDir", ".", "Path to Terraform configuration")
flag.StringVar(&name, "name", "rover", "Configuration name")
flag.StringVar(&zipFileName, "zipFileName", "rover", "Standalone zip file name")
Expand Down

0 comments on commit 84608b6

Please sign in to comment.