Executing wrong Dockerfile
See original GitHub issueHello,
I’m having trouble when building an image from a Dockerfile. For example, in this execution, the Docker command is wrong, it should be RUN sdkmanager --sdk_root=/opt/sdk --install "build-tools;27.0.3"
and not RUN sdkmanager --sdk_root=/opt/sdk --install "build-tools;21.1.2"
.
Here is the Dockerfile I’m using and here the step of the workflow.
Dockerfile:
FROM alvrme/alpine-android-base:jdk8
LABEL maintainer="Álvaro S. <alvaro@alvr.me>"
ENV BUILD_TOOLS "27.0.3"
ENV TARGET_SDK "27"
ENV PATH $PATH:${ANDROID_SDK_ROOT}/build-tools/${BUILD_TOOLS}
# Install SDK Packages
RUN sdkmanager --sdk_root=${ANDROID_SDK_ROOT} --install "build-tools;${BUILD_TOOLS}" "platforms;android-${TARGET_SDK}" && \
sdkmanager --sdk_root=${ANDROID_SDK_ROOT} --uninstall emulator
Configuration:
- name: Build Android API 27 JDK8
uses: docker/build-push-action@v2
with:
context: ./android-27
file: ./android-27/jdk8.Dockerfile
no-cache: true
push: true
tags: |
${{ env.DH_IMAGE_NAME }}:android-27
${{ env.DH_IMAGE_NAME }}:android-27-jdk8
ghcr.io/${{ env.GHCR_IMAGE_NAME }}:android-27
ghcr.io/${{ env.GHCR_IMAGE_NAME }}:android-27-jdk8
quay.io/${{ env.QUAY_IMAGE_NAME }}:android-27
quay.io/${{ env.QUAY_IMAGE_NAME }}:android-27-jdk8
In that run, the steps for “Build Android API 21 JDK8” trought “Build Android API 28 JDK8” are having the same problems, all are using the wrong command (except API 21 that is correct)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Dockerfile build - possible to ignore error? - Stack Overflow
Sure. Docker is just responding to the error codes returned by the RUN shell scripts in the Dockerfile . If your Dockerfile has...
Read more >9 Common Dockerfile Mistakes - Runnablog
9 Common Dockerfile Mistakes · 1. Running apt-get · 2. Using ADD instead of COPY · 3. Adding your entire application directory in...
Read more >How to Fix and Debug Docker Containers Like a Superhero
Confirm that permissions are incorrect. Run a chmod 774 command to let this file read, write, and execute for all users. Use docker...
Read more >Docker build failes with dockerfile created by VS
Original dockerfile generated by VS2017: I'm using containers for linux. The error I'm getting in both cases (locally executing `docker build` and CI ......
Read more >Error when execute "docker-compose up" - SitePoint
Hello there, I have 2 errors when executing “docker-compose up” docker-databaseimportexport-1 | ERROR 1396 (HY000) at line 1: Operation ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@alvr
You can use something like this:
Fixed since BuildKit 0.9.0