Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐋 : use latest terraform image #24

Merged
merged 1 commit into from
Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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