Skip to content

Commit

Permalink
fix: docker build deprecation warnings
Browse files Browse the repository at this point in the history
With the latest Docker upgrade, we got the following warnings during
build:

	FromAsCasing: 'as' and 'FROM' keywords' casing do not match
	LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format
  • Loading branch information
regisb committed Jun 21, 2024
1 parent 4d4bc48 commit 145ac95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions changelog.d/20240621_170044_regis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Bugfix] Fix legacy warnings during Docker build. (by @regisb)
10 changes: 5 additions & 5 deletions tutorandroid/templates/android/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ FROM base AS sdk
# Install Android SDK
# Inspired from https://github.com/LiveXP/docker-android-sdk/blob/master/Dockerfile
# Get sdk version from here: https://developer.android.com/studio#command-tools
ENV ANDROID_SDK_VERSION 11076708
ENV ANDROID_SDK_PATH /app/android-sdk
ENV ANDROID_HOME /app/android-sdk
ENV ANDROID_SDK_VERSION=11076708
ENV ANDROID_SDK_PATH=/app/android-sdk
ENV ANDROID_HOME=/app/android-sdk
RUN mkdir ${ANDROID_HOME}
WORKDIR /app/android-sdk
RUN wget --quiet https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_VERSION}_latest.zip && \
Expand Down Expand Up @@ -53,7 +53,7 @@ RUN ./gradlew -v
RUN ./gradlew tasks

###### Build image with app-specific settings
FROM common as build
FROM common AS build

# User-customized config
COPY ./config/tutor.yaml ./default_config/dev/config.yaml
Expand All @@ -72,6 +72,6 @@ RUN ./gradlew assembleProd{{ "Release" if ANDROID_ENABLE_RELEASE_MODE else "Debu

#### File server to serve apk file
# https://hub.docker.com/_/caddy?tab=tags
FROM docker.io/caddy:2.6.4-alpine as production
FROM docker.io/caddy:2.6.4-alpine AS production
COPY --from=build /app/openedx-app-android/app/build/outputs/apk/prod/{{ "release" if ANDROID_ENABLE_RELEASE_MODE else "debug" }}/app-prod-{{ "release" if ANDROID_ENABLE_RELEASE_MODE else "debug" }}.apk /srv/app.apk
CMD caddy file-server --listen=:8000 --root=/srv

0 comments on commit 145ac95

Please sign in to comment.