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

bundle-build target doesn't work without setting DOCKER_CONTEXT=default for porter #3801

Closed
TonyWildish opened this issue Dec 1, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@TonyWildish
Copy link
Contributor

Remember to label the issue with the appropriate area, and also assign it to yourself if you plan to work on the issue in the near future.

Describe the bug
Running make on a Mac terminal session, the bundle-build target fails because porter doesn't have the correct Docker context. Setting DOCKER_CONTEXT=DEFAULT on the command line before executing porter fixes this:

@@ -186,14 +196,18 @@ lint-docs:
# check-params is called at the end since it needs the bundle image,
# so we build it first and then run the check.
bundle-build:
        $(call target_title, "Building ${DIR} bundle with Porter") \
        && . ${MAKEFILE_DIR}/devops/scripts/check_dependencies.sh porter,env \
        && . ${MAKEFILE_DIR}/devops/scripts/set_docker_sock_permission.sh \
        && cd ${DIR} \
        && if [ -d terraform ]; then terraform -chdir=terraform init -backend=false; terraform -chdir=terraform validate; fi \
        && FULL_IMAGE_NAME_PREFIX=${FULL_IMAGE_NAME_PREFIX} IMAGE_NAME_PREFIX=${IMAGE_NAME_PREFIX} \
                ${MAKEFILE_DIR}/devops/scripts/bundle_runtime_image_build.sh \
-       && porter build \
+       && DOCKER_CONTEXT=default porter build \
          $(MAKE) bundle-check-params

This might be Mac-specific, but the fix is generic, so including it won't hurt.

Steps to reproduce

  1. Install AzureTRE git repo on a Mac
  2. Run through the build procedure, wait for it to get to the bundle-build target

Azure TRE release version (e.g. v0.14.0 or main):
main

Deployed Azure TRE components - click the (i) in the UI:
none, didn't get that far.

@TonyWildish TonyWildish added the bug Something isn't working label Dec 1, 2023
@marrobi
Copy link
Member

marrobi commented Dec 1, 2023

@TonyWildish Can you confirm that you running inside the dev container?

@TonyWildish
Copy link
Contributor Author

No, I'm running from the Terminal, not in the devcontainer.

I realise that puts me out on a limb in terms of deployment, but since the fix is generic, I thought it might be worth mentioning.

@marrobi
Copy link
Member

marrobi commented Dec 1, 2023

As per https://microsoft.github.io/AzureTRE/v0.15.2/tre-admins/setup-instructions/deployment-repo/#clone-the-azure-tre-deployment-git-repository - all steps need to be run inside the dev container.

We are aware of other platform specific issues, such as Windows, and often conflicting (as in change it for one, breaks another), so by using the dev container we can support a workflow that works across operating systems.

Hope that helps. I'll close the issue.

@marrobi marrobi closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants