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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 3 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \

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

curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
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 && \

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 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 && \

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.* && \

apt-get install -y dotnet-sdk-6.0 && \
rm -rf /var/lib/apt/lists/*

WORKDIR /app
Expand All @@ -48,17 +43,3 @@ RUN yarn build:dev --no-cache
# we need a fake display (to run headful chromium), which we create by starting a Virtualized X server environment using xvfb-run
# man page for command: https://manpages.ubuntu.com/manpages/xenial/man1/xvfb-run.1.html
ENTRYPOINT ["/bin/sh", "-c", "xvfb-run --server-args=\"-screen 0 1024x768x24\" yarn test:e2e $@", ""]

FROM setup AS unified
RUN apt-get update && \
apt-get install -y dos2unix \
&& rm -rf /var/lib/apt/lists/*
RUN yarn playwright install-deps chromium
RUN yarn build:unified --no-cache
# because Xvfb commands must run on the container after it is built we need to use
# a bash script. these commands copy the script into the container and reformat
# the file to run in linux
ADD unified-entrypoint.sh /unified-entrypoint.sh
RUN chmod +x /unified-entrypoint.sh
RUN dos2unix /unified-entrypoint.sh
ENTRYPOINT ["/unified-entrypoint.sh"]
15 changes: 0 additions & 15 deletions unified-entrypoint.sh

This file was deleted.