Skip to content

Commit

Permalink
Use absolute path for entryfile (#85)
Browse files Browse the repository at this point in the history
* Use absolute path for entryfile

* Pass path into script
  • Loading branch information
MJohnson459 authored Nov 13, 2024
1 parent 21c2fcc commit 432f01c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion environment/image_recipes/docker/docker.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@

{
"type": "file",
"source": "entrypoint.sh",
"source": "{{user `entrypoint_path`}}",
"destination": "/bin/entrypoint.sh"
}
],
Expand Down
4 changes: 3 additions & 1 deletion tailor_image/create_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def create_image(name: str, distribution: str, apt_repo: str, release_track: str
if build_type == 'docker':
image_name = f'tailor-image-{name}-{distribution}-{release_label}'
docker_registry_data = docker_registry.replace('https://', '').split('/')
entrypoint_path = f'/tailor-image/environment/image_recipes/docker/entrypoint.sh'
ecr_server = docker_registry_data[0]
ecr_repository = docker_registry_data[1]
extra_vars = [
Expand All @@ -83,7 +84,8 @@ def create_image(name: str, distribution: str, apt_repo: str, release_track: str
'-var', f'os_version={distribution}',
'-var', f'ecr_repository={ecr_repository}',
'-var', f'aws_access_key={os.environ["AWS_ACCESS_KEY_ID"]}',
'-var', f'aws_secret_key={os.environ["AWS_SECRET_ACCESS_KEY"]}'
'-var', f'aws_secret_key={os.environ["AWS_SECRET_ACCESS_KEY"]}',
'-var', f'entrypoint_path={entrypoint_path}'
]

if not publish:
Expand Down

0 comments on commit 432f01c

Please sign in to comment.