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

feat(remove-android): Docker file cleanup #6759

Merged
merged 5 commits into from
Jun 25, 2023

Conversation

DaveTryon
Copy link
Contributor

Details

Simplify our Dockerfile as follows:

  • Remove the unified entry point
  • Revert the Dockerfile changes from test: convert mock-adb to .NET #5720, which is where the .NET build tools were added for mock-adb. Since the lines in this block were formatted inconsistently, adopt a consistent standard (one statement per line with && at the end of the line)
Motivation

Part of Android removal feature

Context

Pull request checklist

  • Addresses an existing issue: Android deprecation feature
  • Ran yarn fastpass
  • [n/a] Added/updated relevant unit test(s) (and ran yarn test)
  • [n/a] Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
  • PR title AND final merge commit title both start with a semantic tag (fix:, chore:, feat(feature-name):, refactor:). See CONTRIBUTING.md.
  • [n/a] (UI changes only) Added screenshots/GIFs to description above
  • [n/a] (UI changes only) Verified usability with NVDA/JAWS

@DaveTryon DaveTryon requested a review from a team as a code owner June 24, 2023 00:03
RUN apt-get update && \
apt-get install -y curl apt-transport-https && \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This undoes the Dockerfile changes from #5720, then standardizes the formatting

@@ -14,17 +14,12 @@ USER root
#
# We pin nodejs 16.x instead of accepting Playwright's default for consistency with
# our other build environments.
#
# dotnet-sdk-6.0 is required to build mock-adb
RUN apt-get update && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On modern Debian-based systems:

Suggested change
RUN apt-get update && \
RUN apt update && \

curl -fsSL https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -o packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
rm packages-microsoft-prod.deb && \
apt-get install ca-certificates && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
apt-get install ca-certificates && \
apt install ca-certificates && \

curl -fsSL https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -o packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
rm packages-microsoft-prod.deb && \
apt-get install ca-certificates && \
apt-get update && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
apt-get update && \
apt update && \

apt-get update && \
apt-get install -y curl && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
apt-get install -y curl && \
apt install -y curl && \

apt-get update && \
apt-get install -y curl && \
curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
apt-get install -y --allow-downgrades nodejs=16.* && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
apt-get install -y --allow-downgrades nodejs=16.* && \
apt install -y --allow-downgrades nodejs=16.* && \

@DaveTryon
Copy link
Contributor Author

@codeofdusk, I tried replacing apg-get with apt and the logs contained a warning that the apt CLI isn't stable and isn't recommended for scripting. Because of that, I reverted back to using apt-get

@DaveTryon DaveTryon merged commit b47501b into microsoft:main Jun 25, 2023
11 checks passed
@DaveTryon DaveTryon deleted the docker-file-cleanup branch June 26, 2023 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants