Skip to content

Commit d135037

Browse files
authored
Revert "[universal] - Issue universal config change for non-root default codespace user and installing google chrome browser reuse sandbox to run puppeteer cli in universal image" (#1315)
* Revert "[universal] - Issue universal config change for non-root default code…" This reverts commit c930750. * Updating with the changes suggested for UID & GID issue for oryx-install-dotnet-2.1 resr step to succeed. Also change done in image size check part.
1 parent c930750 commit d135037

File tree

8 files changed

+8
-31
lines changed

8 files changed

+8
-31
lines changed

.github/workflows/push-dev.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ jobs:
2929
- name: Checkout
3030
id: checkout
3131
uses: actions/checkout@v3
32-
3332

3433
- name: Build and push dev tags
3534
id: build_and_push
@@ -41,7 +40,7 @@ jobs:
4140
STUB_REGISTRY_BASE_PATH: ${{ secrets.STUB_REGISTRY_BASE_PATH }}
4241
SECONDARY_REGISTRY_BASE_PATH: ${{ secrets.SECONDARY_REGISTRY_BASE_PATH }}
4342
TOKEN_NAME: ${{ secrets.TOKEN_NAME }}
44-
PASSWORD: ${{ secrets.PASSWORD }}
43+
PASSWORD: ${{ secrets.PASSWORD }}
4544
run: |
4645
set -e
4746

.github/workflows/push-manual-dev.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
with:
3737
path: 'release'
3838
ref: ${{ github.event.inputs.release }}
39-
39+
4040
- name: Build and push
4141
id: build_and_push
4242
env:

.github/workflows/push.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
2929
- name: Checkout
3030
id: checkout
31-
uses: actions/checkout@v3
31+
uses: actions/checkout@v3
3232

3333
- name: Get tag name
3434
run: echo "TAG=$(echo "${{ github.ref }}" | grep -oP 'refs/tags/\K(.+)')" >> $GITHUB_ENV

.github/workflows/smoke-universal.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ jobs:
1919
- name: Checkout
2020
id: checkout
2121
uses: actions/checkout@v3
22-
2322
- name: Smoke test
2423
env:
25-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2625
id: smoke_test
2726
uses: ./.github/actions/smoke-test
2827
with:

src/universal/.devcontainer/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@ RUN apt-get update \
6969
# Install tools and shells not in common script
7070
&& apt-get install -yq vim vim-doc xtail software-properties-common libsecret-1-dev \
7171
# Install additional tools (useful for 'puppeteer' project)
72-
# Also added three new libraries to ensure google chrome sucessful installation
7372
&& apt-get install -y --no-install-recommends libnss3 libnspr4 libatk-bridge2.0-0 libatk1.0-0 libx11-6 libpangocairo-1.0-0 \
74-
libx11-xcb1 libcups2 libxcomposite1 libxdamage1 libxfixes3 libpango-1.0-0 libgbm1 libgtk-3-0 fonts-liberation libvulkan1 xdg-utils \
73+
libx11-xcb1 libcups2 libxcomposite1 libxdamage1 libxfixes3 libpango-1.0-0 libgbm1 libgtk-3-0 \
7574
# Clean up
7675
&& apt-get autoremove -y && apt-get clean -y \
7776
# Move first run notice to right spot

src/universal/.devcontainer/devcontainer.json

+2-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"ghcr.io/devcontainers/features/common-utils:2": {
88
"username": "codespace",
99
"userUid": "1000",
10-
"userGid": "1000"
10+
"userGid": "1000"
1111
},
1212
"ghcr.io/devcontainers/features/dotnet:2": {
1313
"version": "8.0",
@@ -103,11 +103,7 @@
103103
],
104104
"remoteUser": "codespace",
105105
"containerUser": "codespace",
106-
// This variable is set to ensure puppeteer library gets the sandbox location by default.
107-
// Ref:- https://github.com/devcontainers/internal/issues/249
108-
"containerEnv": {
109-
"CHROME_DEVEL_SANDBOX": "/usr/local/sbin/chrome-devel-sandbox"
110-
},
106+
111107
// Use 'forwardPorts' to make a list of ports inside the container available locally.
112108
// "forwardPorts": [],
113109

src/universal/.devcontainer/local-features/setup-user/install.sh

-12
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,4 @@ bash -c ". /usr/local/share/nvm/nvm.sh && nvm use 18"
9696
bash -c "npm -g install -g [email protected]"
9797
bash -c ". /usr/local/share/nvm/nvm.sh && nvm use stable"
9898

99-
# Installing google chrome to use the sandbox for launching browser using puppeteer library in nodejs.
100-
# Ref:- https://github.com/devcontainers/internal/issues/249
101-
cd /
102-
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
103-
dpkg -i google-chrome-stable_current_amd64.deb
104-
cd /opt/google/chrome/
105-
chown root:root chrome-sandbox
106-
chmod 4755 chrome-sandbox
107-
cp -p chrome-sandbox /usr/local/sbin/chrome-devel-sandbox
108-
cd /
109-
rm -f google-chrome-stable_current_amd64.deb
110-
11199
echo "Done!"

src/universal/test-project/test.sh

100755100644
+1-5
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,6 @@ check "zsh" zsh --version
134134
# Check env variable
135135
check "RAILS_DEVELOPMENT_HOSTS is set correctly" echo $RAILS_DEVELOPMENT_HOSTS | grep ".githubpreview.dev,.preview.app.github.dev,.app.github.dev"
136136

137-
# Check that we can run a puppeteer node app.
138-
yarn
139-
check "run-puppeteer" node puppeteer.js
140-
141137
# Check Oryx
142138
check "oryx" oryx --version
143139

@@ -204,4 +200,4 @@ check "conda-install-tensorflow" bash -c "conda create --name test-env -c conda-
204200
check "conda-install-pytorch" bash -c "conda create --name test-env -c conda-forge --yes pytorch"
205201

206202
# Report result
207-
reportResults
203+
reportResults

0 commit comments

Comments
 (0)