Skip to content

Commit

Permalink
#409 - reference remote Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
obriensystems committed Apr 28, 2024
1 parent 3c272ec commit 0cb6d7a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 43 deletions.
2 changes: 1 addition & 1 deletion 0-bootstrap/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
FROM gcr.io/cloud-builders/gcloud-slim

# Use ARG so that values can be overriden by user/cloudbuild
ARG TERRAFORM_VERSION=1.3.0
ARG TERRAFORM_VERSION=1.3.10

ENV ENV_TERRAFORM_VERSION=$TERRAFORM_VERSION

Expand Down
39 changes: 0 additions & 39 deletions build/docker/Dockerfile

This file was deleted.

8 changes: 5 additions & 3 deletions build/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@
# Michael O'Brien

CONTAINER_IMAGE=terraform-example-foundation-ado
RELEASE_ID=0.0.1
RELEASE_ID=0.0.2
DOCKER_FILE=Dockerfile
DOCKERHUB_ORG=obrienlabs
CONTAINER_NAME=tef-ado

# DockerHub only
docker rm -v $CONTAINER_NAME
docker build --rm=true --no-cache --build-arg build-id=$BUILD_ID -t $DOCKERHUB_ORG/$CONTAINER_IMAGE -f $DOCKER_FILE .
docker image rm $DOCKERHUB_ORG/$CONTAINER_IMAGE -f
docker image rm $DOCKERHUB_ORG/$CONTAINER_IMAGE:latest -f
docker build --rm=true --no-cache --build-arg build-id=$BUILD_ID -t $DOCKERHUB_ORG/$CONTAINER_IMAGE -f ../../0-bootstrap/$DOCKER_FILE .
docker tag $DOCKERHUB_ORG/$CONTAINER_IMAGE $DOCKERHUB_ORG/$CONTAINER_IMAGE:$RELEASE_ID
docker tag $DOCKERHUB_ORG/$CONTAINER_IMAGE $DOCKERHUB_ORG/$CONTAINER_IMAGE:latest
docker push $DOCKERHUB_ORG/$CONTAINER_IMAGE:$RELEASE_ID
docker push $DOCKERHUB_ORG/$CONTAINER_IMAGE:latest

# Run on ia64 platform only (not arm64)
echo "test a terraform exe run on ia64 only - not arm64 - should print at least 1.3.10"
docker run --name $CONTAINER_NAME $DOCKERHUB_ORG/$CONTAINER_IMAGE --version
docker run --name $CONTAINER_NAME $DOCKERHUB_ORG/$CONTAINER_IMAGE:latest --version

0 comments on commit 0cb6d7a

Please sign in to comment.