Skip to content

Commit

Permalink
Merge pull request Azure#14 from cormacpayne/corm/misc-containerapp-c…
Browse files Browse the repository at this point in the history
…hanges

Miscellaneous changes to containerapp module
  • Loading branch information
cormacpayne authored May 15, 2023
2 parents a8dddb3 + 85c50f8 commit 8e4c60d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/containerapp/azext_containerapp/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import json
import platform
import docker
import stat
import io
import os
import requests
Expand Down Expand Up @@ -1746,7 +1747,6 @@ def is_docker_running():

def get_pack_exec_path():
try:

dir_path = os.path.dirname(os.path.realpath(__file__))
bin_folder = os.path.join(dir_path, "bin")
if not os.path.exists(bin_folder):
Expand Down Expand Up @@ -1787,6 +1787,11 @@ def get_pack_exec_path():
with open(exec_path, "wb") as f:
f.write(tar.extractfile(tar_info).read())

# Add executable permissions for the current user if they don't exist
if not os.access(exec_path, os.X_OK):
st = os.stat(exec_path)
os.chmod(exec_path, st.st_mode | stat.S_IXUSR)

return exec_path
except Exception as e:
# Swallow any exceptions thrown when attempting to install pack CLI
Expand Down
1 change: 1 addition & 0 deletions src/containerapp/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker>=6.1.2
2 changes: 1 addition & 1 deletion src/containerapp/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# TODO: Add any additional SDK dependencies here
DEPENDENCIES = [
'pycomposefile>=0.0.29',
'docker'
'docker>=6.1.2'
]

# Install pack CLI to build runnable application images from source
Expand Down

0 comments on commit 8e4c60d

Please sign in to comment.