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

Set UID in docker run #28918

Merged
merged 1 commit into from
Feb 1, 2025
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
5 changes: 3 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
fi
docker run --rm \
-u $(id -u) \
-v $PWD:/usr/src/tdesktop \
-e CONFIG=Debug \
tdesktop:centos_env \
Expand Down Expand Up @@ -114,8 +115,8 @@ jobs:
if: env.UPLOAD_ARTIFACT == 'true'
run: |
cd $REPO_NAME/out/Debug
sudo mkdir artifact
sudo mv {Telegram,Updater} artifact/
mkdir artifact
mv {Telegram,Updater} artifact/
- uses: actions/upload-artifact@v4
if: env.UPLOAD_ARTIFACT == 'true'
name: Upload artifact.
Expand Down
2 changes: 1 addition & 1 deletion Telegram/build/docker/centos_env/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ if [ "$Command" == "" ]; then
Command="bash"
fi

docker run -it --rm --cpus=8 --memory=22g -v $HOME/Telegram/DesktopPrivate:/usr/src/DesktopPrivate -v $HOME/Telegram/tdesktop:/usr/src/tdesktop tdesktop:centos_env $Command
docker run -it --rm --cpus=8 --memory=22g -u $(id -u) -v $HOME/Telegram/DesktopPrivate:/usr/src/DesktopPrivate -v $HOME/Telegram/tdesktop:/usr/src/tdesktop tdesktop:centos_env $Command
2 changes: 2 additions & 0 deletions docs/building-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Install [poetry](https://python-poetry.org), go to ***BuildPath*** and run
Go to ***BuildPath*/tdesktop** and run (using [your **api_id** and **api_hash**](#obtain-your-api-credentials))

docker run --rm -it \
-u $(id -u) \
-v "$PWD:/usr/src/tdesktop" \
tdesktop:centos_env \
/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
Expand All @@ -29,6 +30,7 @@ Go to ***BuildPath*/tdesktop** and run (using [your **api_id** and **api_hash**]
Or, to create a debug build, run (also using [your **api_id** and **api_hash**](#obtain-your-api-credentials))

docker run --rm -it \
-u $(id -u) \
-v "$PWD:/usr/src/tdesktop" \
-e CONFIG=Debug \
tdesktop:centos_env \
Expand Down