Skip to content

Commit

Permalink
Merge pull request #277 from rem1776/createDockerfile-buildscript
Browse files Browse the repository at this point in the history
add container buildscript creation for `createDockerfile`
  • Loading branch information
singhd789 authored Nov 27, 2024
2 parents c8d940e + 999e459 commit eaa05ed
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions fre/make/createDocker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import os
import sys
import subprocess
from pathlib import Path
import click
#from .gfdlfremake import varsfre, targetfre, makefilefre, platformfre, yamlfre, buildDocker
Expand Down Expand Up @@ -72,10 +73,13 @@ def dockerfile_create(yamlfile,platform,target,execute):
click.echo("\ntmpDir created in " + currDir + "/tmp")
click.echo("Dockerfile created in " + currDir +"\n")

if run:
dockerBuild.build(containerBuild, containerRun)
else:
sys.exit()
# create build script for container
dockerBuild.createBuildScript(containerBuild, containerRun)
print("Container build script created at "+dockerBuild.userScriptPath+"\n\n")

# run the script if option is given
if run:
subprocess.run(args=[dockerBuild.userScriptPath], check=True)

@click.command()
def _dockerfile_create(yamlfile,platform,target,execute):
Expand Down

0 comments on commit eaa05ed

Please sign in to comment.