Skip to content

Commit

Permalink
🐳 : use latest terraform image
Browse files Browse the repository at this point in the history
  • Loading branch information
juwit committed Jun 17, 2019
1 parent 08aaefe commit 16c8a85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/main/java/io/codeka/gaia/runner/StackRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ public StackRunner(DockerClient dockerClient, ContainerConfig.Builder containerC

private int runContainerForJob(Job job, String script){
try{
// FIXME This is certainly no thread safe
// FIXME This is certainly no thread safe !
var containerConfig = containerConfigBuilder
.env(settings.env())
.build();

// pull the image
dockerClient.pull("hashicorp/terraform:0.11.14");
dockerClient.pull("hashicorp/terraform:latest");

System.out.println("Create container");
var containerCreation = dockerClient.createContainer(containerConfig);
Expand All @@ -74,7 +74,6 @@ private int runContainerForJob(Job job, String script){
System.err.println("Starting container");
dockerClient.startContainer(containerId);


final PipedInputStream stdout = new PipedInputStream();
final PipedInputStream stderr = new PipedInputStream();
final PipedOutputStream stdout_pipe = new PipedOutputStream(stdout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DockerClient client(Settings settings) {
@Bean
ContainerConfig.Builder containerConfig(){
return ContainerConfig.builder()
.image("hashicorp/terraform:0.11.14")
.image("hashicorp/terraform:latest")
// bind mounting the docker sock (to be able to use docker provider in terraform)
.hostConfig(HostConfig.builder().binds(HostConfig.Bind.builder().from("/var/run/docker.sock").to("/var/run/docker.sock").build()).build())
// resetting entrypoint to empty
Expand Down

0 comments on commit 16c8a85

Please sign in to comment.