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

Fixing nasty OSX bug where docker mount root dir #409

Merged
merged 1 commit into from
May 2, 2022
Merged

Conversation

davidferlay
Copy link
Contributor

@davidferlay davidferlay commented Apr 29, 2022

Before :

/bin/sh: realpath: command not found
make -s down
Removing network & containers for skilld
[+] Running 4/4
 ⠿ Container skilld_web   Removed                                                                                                                                0.4s
 ⠿ Container skilld_mail  Removed                                                                                                                                0.3s
 ⠿ Container skilld_php   Removed                                                                                                                                0.4s
 ⠿ Network skilld_front   Removed                                                                                                                                0.1s
CURDIR=/Users/skilld/Sources/ski-platform/roles/techs/services/skilld-landing/files
#
#@docker run --rm --user 0:0 -v /Users/skilld/Sources/ski-platform/roles/techs/services/skilld-landing/files:/mnt -w /mnt -e RMLIST=" web/core web/libraries web/modules/contrib web/profiles/contrib web/sites web/themes/contrib vendor" skilldlabs/php:74-fpm sh -c 'for i in $RMLIST; do rm -fr $i && echo "Removed $i"; done'
Clean-up database data from / ...
docker run --rm --user 0:0 -v /:/mnt skilldlabs/php:74-fpm sh -c "rm -fr /mnt/`basename /`"
rm: can't remove '/mnt/var/run/linuxkit-external-logging.sock': Resource busy
rm: can't remove '/mnt/var/run/linuxkit-containerd/containerd.sock': Resource busy
rm: can't remove '/mnt/var/log': Resource busy

After :

CURDIR=/Users/skilld/Sources/ski-platform/roles/techs/services/skilld-landing/files
#@docker run --rm --user 0:0 -v /Users/skilld/Sources/ski-platform/roles/techs/services/skilld-landing/files:/mnt -w /mnt -e RMLIST=" web/core web/libraries web/modules/contrib web/profiles/contrib web/sites web/themes/contrib vendor" skilldlabs/php:74-fpm sh -c 'for i in $RMLIST; do rm -fr $i && echo "Removed $i"; done'
Clean-up database data from /Users/skilld/Sources/ski-platform/roles/techs/services/skilld-landing/files/.cache ...
docker run --rm --user 0:0 -v /Users/skilld/Sources/ski-platform/roles/techs/services/skilld-landing/files:/mnt skilldlabs/php:74-fpm sh -c "rm -fr /mnt/`basename /Users/skilld/Sources/ski-platform/roles/techs/services/skilld-landing/files/.cache`"

Makefile Show resolved Hide resolved
@davidferlay davidferlay merged commit 6796fc3 into master May 2, 2022
@davidferlay davidferlay deleted the osxbug branch May 2, 2022 14:37
@andypost
Copy link
Contributor

andypost commented May 2, 2022

Not clear why PHP_VERSION=7 for osx added

@davidferlay
Copy link
Contributor Author

davidferlay commented May 3, 2022

Well that's actually a good question @andypost

Maybe an OSX user can enlighten us ?

Edit: Found back #400 > Need to check if it is exhaustive and accurate

@andypost
Copy link
Contributor

andypost commented May 3, 2022

I bet it remains from past when we used to switch to php 7 from 5

@artreaktor-niks
Copy link

the main part in env extra code is
CUID=1000
CGID=1000

  • before for MacOs - were need to change Make file rows
    LOCAL_UID := $(shell id -u)
    LOCAL_GID := $(shell id -g)
with

LOCAL_UID := 1000#$(shell id -u)
LOCAL_GID := 1000#$(shell id -g)

But for the PHP_VERSION=7 actually not sure.
This by default goes from project to project.
I think it could be removed.

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.

3 participants