Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

docker-app no longer works on arm #611

Closed
doanac opened this issue Sep 13, 2019 · 6 comments
Closed

docker-app no longer works on arm #611

doanac opened this issue Sep 13, 2019 · 6 comments
Labels

Comments

@doanac
Copy link
Contributor

doanac commented Sep 13, 2019

Between 0.6 and 0.8 support for docker-app render was broken on non-intel platforms. It seems docker-app now has to run the "cnab-app-base" docker image. However, this image is only built for amd64 on hub.docker.io.

I was able to put together a multi-arch image at hub.foundries.io/cnab-app-base:v0.8.0 and was able to get the tool to work. However, it did require a patch:

diff --git a/Dockerfile.invocation-image b/Dockerfile.invocation-image
index 30fbced5..29c5b190 100644
--- a/Dockerfile.invocation-image
+++ b/Dockerfile.invocation-image
@@ -1,8 +1,8 @@
 ARG ALPINE_VERSION=3.9.4
 
-FROM dockercore/golang-cross:1.12.5@sha256:15b5f9805c0395d3ad80f9354ee358312e1abe3a683ce80371ad0551199ff253 AS build
+FROM golang:1.12.9 AS build
 
-RUN apt-get install -y -q --no-install-recommends \
+RUN apt-get update -qq && apt-get install -y -q --no-install-recommends \
     coreutils \
     util-linux \
     uuid-runtime

As dockercore/golang-cross is also only available for amd64.

I think doing mulit-arch builds is all we really need to fix this. However, I am curious why this cnab-app-base container needs to run when I'm doing a docker-app render command?

@silvin-lubecki
Copy link
Contributor

Hello @doanac, thank you for noticing it 👍 we missed that arm64 build 🤦‍♂

@silvin-lubecki
Copy link
Contributor

@doanac Can I ask you to open a PR with your changes?

@doanac
Copy link
Contributor Author

doanac commented Sep 16, 2019

@silvin-lubecki - sure thing. I was sure if that's how you guys wanted to go about making it multi-arch or not.

doanac added a commit to doanac/app that referenced this issue Sep 16, 2019
The container used for compiling the application is only available on
amd64. This change uses a multi-arch golang container and also fixes
an issue where the apt cache can be out-of-date.

Fixes Bug docker#611

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Reported-by: Andy Doan <andy@foundries.io>
doanac added a commit to doanac/app that referenced this issue Sep 16, 2019
The container used for compiling the application is only available on
amd64. This change uses a multi-arch golang container and also fixes
an issue where the apt cache can be out-of-date.

Fixes Bug docker#611

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Reported-by: Andy Doan <andy@foundries.io>
@silvin-lubecki
Copy link
Contributor

About the render command and the invocation image: the render is executed inside the invocation image, we added it as a CNAB custom action. All the render code is executed inside the backend. Does that make sense?

@doanac
Copy link
Contributor Author

doanac commented Sep 16, 2019

@silvin-lubecki - thanks. it does.

@ndeloof ndeloof closed this as completed Oct 9, 2019
@doanac
Copy link
Contributor Author

doanac commented Oct 9, 2019

@ndeloof - i'm not sure this is really fixed. I still don't see any arm64 builds here: https://hub.docker.com/r/docker/cnab-app-base/tags

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants