Where are docker images stored physically on macos? - macos

The following shows a few locations.
https://forums.docker.com/t/where-are-images-stored-on-mac-os-x/17165/4
But I don't see which file correponses to which image. Could anybody show me how to figure out the physical location of each image? Thanks.
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a06b2d5530d4 gcc:4.9 "bash" 3 days ago Up 3 days awesome_northcutt
99bfd1b8c105 ubuntu "bash" 3 days ago Exited (0) 3 days ago heuristic_clarke
16a89b2caa3c ubuntu "/bin/bash" 3 days ago Exited (0) 3 days ago xenodochial_lamarr
3137d54a035d ubuntu "bash" 8 days ago Exited (0) 8 days ago eager_napier
60714fa75fc4 hello-world "/hello" 8 days ago Exited (0) 8 days ago zen_pare
a78b73509455 hello-world "/hello" 8 days ago Exited (0) 8 days ago adoring_visvesvaraya
b5ea8abe5858 hello-world "/hello" 8 days ago Exited (0) 8 days ago brave_tesla
$ cd $HOME/Library/Containers/com.docker.docker/Data/
$ ls -Rg
.:
total 0
srwxr-xr-x 1 staff 0 Jan 2 19:44 backend.sock
drwxr-xr-x 3 staff 96 Feb 16 2018 database
srwxr-xr-x 1 staff 0 Jan 2 19:44 docker.sock
srwxr-xr-x 1 staff 0 Jan 2 19:44 osxfs.sock
-rw-r--r-- 1 staff 0 Feb 16 2018 task.lock
drwxr-xr-x 6 staff 192 Jan 2 19:44 tasks
drwxr-xr-x 3 staff 96 Jan 2 19:44 vms
srwxr-xr-x 1 staff 0 Jan 2 19:44 vpnkit.diag.sock
srwxr-xr-x 1 staff 0 Jan 2 19:44 vpnkit.eth.sock
srwxr-xr-x 1 staff 0 Jan 2 19:44 vpnkit.pcap.sock
srwxr-xr-x 1 staff 0 Jan 2 19:44 vpnkit.port.sock
./database:
total 0
./tasks:
total 16
-rw-r--r-- 1 staff 235 Jan 2 19:44 com.docker.driver.amd64-linux
-rw-r--r-- 1 staff 1064 Jan 2 19:44 com.docker.hyperkit
-rw-r--r-- 1 staff 343 Jan 2 19:44 com.docker.osxfs
-rw-r--r-- 1 staff 1337 Jan 2 19:44 com.docker.vpnkit
./vms:
total 0
drwxr-xr-x 18 staff 576 Jan 2 19:44 0
./vms/0:
total 7712512
srwxr-xr-x 1 staff 0 Jan 2 19:44 00000002.000005f4
srwxr-xr-x 1 staff 0 Jan 2 19:44 00000002.00001000
srwxr-xr-x 1 staff 0 Jan 2 19:44 00000002.00001001
srwxr-xr-x 1 staff 0 Jan 2 19:44 00000002.0000f3a5
srwxr-xr-x 1 staff 0 Jan 2 19:44 00000003.000005f5
srwxr-xr-x 1 staff 0 Jan 2 19:44 00000003.00000948
-rw-r--r-- 1 staff 63999836160 Jan 11 08:55 Docker.raw
-rw-r--r-- 1 staff 192512 Jan 2 19:44 config.iso
srwxr-xr-x 1 staff 0 Jan 2 19:44 connect
lrwxr-xr-x 1 staff 17 Jan 2 19:44 guest.000005f5 -> 00000003.000005f5
lrwxr-xr-x 1 staff 17 Jan 2 19:44 guest.00000948 -> 00000003.00000948
-rw-r--r-- 1 staff 2304 Jan 2 19:44 hyperkit.json
-rw-r--r-- 1 staff 5 Jan 2 19:44 hyperkit.pid
drwxr-xr-x 2 staff 64 Jan 2 19:44 log
-rw-r--r-- 1 staff 36 Jan 2 19:44 nic1.uuid
lrwxr-xr-x 1 staff 12 Jan 2 19:44 tty -> /dev/ttys184
./vms/0/log:
total 0

Docker does not run natively a Mac because the macOS kernel isn’t compatible (i.e., BSD vs Linux). Docker is actually running in a virtual machine using HyperKit.
And the Docker.raw you listed above is the virtual disk of this virtual machine.
All the docker image is stored inside the virtual machine (in the Docker.raw file), so you can not see them on the Mac filesystem.

screen ~/Library/Containers//com.docker.docker/Data/vms/0/tty
This command should take you to the required file system of docker on MAC

Related

OSX Xcode - program fails to load the library

When I tried to run my program from the Terminal with open dbhandler.app, I am getting the following error:
Dyld Error Message:
Library not loaded: /usr/local/lib/liblibdbwindow.dylib
Referenced from: /Users/USER/*/dbhandler.app/Contents/MacOS/dbhandler
Reason: image not found
Binary Images:
0x10a633000 - 0x10a71cfff +abc.dbhandler (1.0 - 1) <0EED5BE6-858D-3F18-8B1D-B958B921C9F6> /Users/USER/*/dbhandler.app/Contents/MacOS/dbhandler
0x10a7b2000 - 0x10a86bfff +libwx_osx_cocoau_xrc-3.2.dylib (0) <9ABAB987-AECF-3C7E-81D9-D20059AA7DE9> /Users/USER/*/dbhandler.app/Contents/Frameworks/libwx_osx_cocoau_xrc-3.2.dylib
0x10a978000 - 0x10aa1fff7 +libwx_osx_cocoau_html-3.2.dylib (0) <180E0A64-346F-3B51-B4E1-6E6F558B677F> /Users/USER/*/dbhandler.app/Contents/Frameworks/libwx_osx_cocoau_html-3.2.dylib
0x10ab17000 - 0x10ab39fff +libwx_osx_cocoau_qa-3.2.dylib (0) <0873DD66-C859-3CA8-BABB-11902927ED0D> /Users/USER/*/dbhandler.app/Contents/Frameworks/libwx_osx_cocoau_qa-3.2.dylib
0x10ab75000 - 0x10ab79fff +libwx_osx_cocoau_adv-3.2.dylib (0) <E42305C2-8052-3475-969C-18A46AED5D79> /Users/USER/*/dbhandler.app/Contents/Frameworks/libwx_osx_cocoau_adv-3.2.dylib
0x10ab80000 - 0x10b25cff7 +libwx_osx_cocoau_core-3.2.dylib (0) <58B0A14F-A6AB-33F0-A0B3-247E4452F59F> /Users/USER/*/dbhandler.app/Contents/Frameworks/libwx_osx_cocoau_core-3.2.dylib
0x10b9c4000 - 0x10b9d7ff7 +libwx_baseu_xml-3.2.dylib (0) <83568D4A-4344-33EF-8C91-C9D6E3268F09> /Users/USER/*/dbhandler.app/Contents/Frameworks/libwx_baseu_xml-3.2.dylib
0x10b9f3000 - 0x10ba40ff7 +libwx_baseu_net-3.2.dylib (0) <190BA3EF-89D4-3EFC-A385-C99C4770F78F> /Users/USER/*/dbhandler.app/Contents/Frameworks/libwx_baseu_net-3.2.dylib
0x10baad000 - 0x10bceeff7 +libwx_baseu-3.2.dylib (0) <F7F5E898-0082-34D8-A040-14C6F77D3EF2> /Users/USER/*/dbhandler.app/Contents/Frameworks/libwx_baseu-3.2.dylib
0x10bf07000 - 0x10bf81fff +liblibtabledataedit.dylib (0) <48F25B52-D3C6-3AF1-86A5-E1C22082ACEA> /Users/USER/*/dbhandler.app/Contents/Frameworks/liblibtabledataedit.dylib
0x113d5f000 - 0x113da9acf dyld (551.4) <8A72DE9C-A136-3506-AA02-4BA2B82DCAF3> /usr/lib/dyld
0x7fff28983000 - 0x7fff28c11ff7 com.apple.audio.toolbox.AudioToolbox (1.14 - 1.14) <E0B8B5D8-80A0-308B-ABD6-F8612102B5D8> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x7fff292e5000 - 0x7fff292e5fff com.apple.Carbon (158 - 158) <F8B370D9-2103-3276-821D-ACC756167F86> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x7fff297f7000 - 0x7fff297f7fff com.apple.Cocoa (6.11 - 22) <78E6C28E-4308-3D10-AD14-0CBCF6789B3F> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
0x7fff2c7e8000 - 0x7fff2c883fff com.apple.framework.IOKit (2.0.2 - 1445.71.1) <2EA4F383-CAA9-3AF0-99C5-90C22ADAA6B6> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x7fff34531000 - 0x7fff34540ff3 com.apple.opengl (16.7.4 - 16.7.4) <9BDE8FF9-5418-3C70-8D1C-09656884CE48> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x7fff4fb8f000 - 0x7fff4fb90ffb libSystem.B.dylib (1252.50.4) <CD555F3B-FDDB-35E5-A2FB-FBBF3D62031A> /usr/lib/libSystem.B.dylib
Model: MacBookAir7,2, BootROM MBA71.0178.B00, 2 processors, Intel Core i5, 1.8 GHz, 8 GB, SMC 2.27f2
Graphics: Intel HD Graphics 6000, Intel HD Graphics 6000, Built-In
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1600 MHz, 0x802C, 0x4D5435324C3531324D3332443250462D3130
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1600 MHz, 0x802C, 0x4D5435324C3531324D3332443250462D3130
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x117), Broadcom BCM43xx 1.0 (7.77.37.31.1a9)
Bluetooth: Version 6.0.7f10, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM0128G, 121.33 GB
USB Device: USB 3.0 Bus
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Air, Apple Inc., 27.2
and this is an output on the Terminal:
Igors-MacBook-Air:Debug igorkorot$ open dbhandler.app/
LSOpenURLsWithRole() failed with error -10810 for the file /Users/igorkorot/dbhandler/dbhandler/Build/Products/Debug/dbhandler.app.
And this is the output of the Frameworks directory in the Bundle:
Igors-MacBook-Air:Debug igorkorot$ pwd
/Users/igorkorot/dbhandler/dbhandler/Build/Products/Debug
Igors-MacBook-Air:Debug igorkorot$ ls -la dbhandler.app/Contents/Frameworks/
total 189192
drwxr-xr-x 26 igorkorot staff 832 Jan 1 21:17 .
drwxr-xr-x 8 igorkorot staff 256 Jan 1 20:09 ..
-rwxr-xr-x 1 igorkorot staff 2415408 Jun 4 2018 libclang_rt.asan_osx_dynamic.dylib
-rwxr-xr-x 1 igorkorot staff 778384 Jun 4 2018 libclang_rt.ubsan_osx_dynamic.dylib
-rwxr-xr-x 1 igorkorot staff 347052 Jan 1 21:17 liblibdbloader.dylib
-rwxr-xr-x 1 igorkorot staff 6730348 Jan 1 21:17 liblibdbwindow.dylib
-rwxr-xr-x 1 igorkorot staff 8906924 Jan 1 21:17 liblibdialogs.dylib
-rwxr-xr-x 1 igorkorot staff 550680 Jan 1 21:17 liblibfieldswindow.dylib
-rwxr-xr-x 1 igorkorot staff 3970352 Jan 1 21:17 liblibmysql.dylib
-rwxr-xr-x 1 igorkorot staff 6383552 Jan 1 21:17 liblibodbc.dylib
-rwxr-xr-x 1 igorkorot staff 4534984 Jan 1 21:17 liblibpostgres.dylib
-rwxr-xr-x 1 igorkorot staff 466816 Jan 1 21:17 liblibpropertieshandlers.dylib
-rwxr-xr-x 1 igorkorot staff 3015032 Jan 1 21:17 liblibpropertypages.dylib
-rwxr-xr-x 1 igorkorot staff 5226584 Jan 1 21:17 liblibshapeframework.dylib
-rwxr-xr-x 1 igorkorot staff 15739876 Jan 1 21:17 liblibsqlite.dylib
-rwxr-xr-x 1 igorkorot staff 896168 Jan 1 21:17 liblibtabledataedit.dylib
-rwxr-xr-x 1 igorkorot staff 7340480 Jan 1 21:17 libmysqlclient.dylib
-rwxr-xr-x 1 igorkorot staff 4524504 Jan 1 21:17 libwx_baseu-3.2.dylib
-rwxr-xr-x 1 igorkorot staff 732432 Jan 1 21:17 libwx_baseu_net-3.2.dylib
-rwxr-xr-x 1 igorkorot staff 163636 Jan 1 21:17 libwx_baseu_xml-3.2.dylib
-rwxr-xr-x 1 igorkorot staff 20944 Jan 1 21:17 libwx_osx_cocoau_adv-3.2.dylib
-rwxr-xr-x 1 igorkorot staff 14883612 Jan 1 21:17 libwx_osx_cocoau_core-3.2.dylib
-rwxr-xr-x 1 igorkorot staff 1686416 Jan 1 21:17 libwx_osx_cocoau_html-3.2.dylib
-rwxr-xr-x 1 igorkorot staff 356864 Jan 1 21:17 libwx_osx_cocoau_qa-3.2.dylib
-rwxr-xr-x 1 igorkorot staff 4408276 Jan 1 21:17 libwx_osx_cocoau_stc-3.2.dylib
-rwxr-xr-x 1 igorkorot staff 1821868 Jan 1 21:17 libwx_osx_cocoau_xrc-3.2.dylib
Igors-MacBook-Air:Debug igorkorot$
What is the best way to find out what library is at fault?
You have liblibdbwindow.dylib in your app's Contents/Frameworks folder, but the error message says that it is expected to be in /usr/local/lib. If you issue the terminal command
otool -L /Users/igorkorot/dbhandler/Build/Products/Debug/dbhandler.app/Contents/MacOS/dbhandler
then I expect that to show that your app binary is looking for the dylib in /usr/local/lib. And if you do otool -L on liblibdbwindow.dylib, the first line of output (the "shared library ID") will presumably also be /usr/local/lib/liblibdbwindow.dylib. To fix this, you'll need to make changes in both the dylib and the app executable.
Assuming that liblibdbwindow.dylib is something you are building yourself, set the build setting INSTALL_PATH in the dylib target to #rpath. (If it's not your code, you'll need to use install_name_tool to fix it.)
In the target for the app, the build setting LD_RUNPATH_SEARCH_PATHS should include something like #loader_path/../Frameworks.

Is there a way to remove the owner's read permissions on a file in macOS?

Is there any way to take away the owner's permission to read a file in macOS? I know there's no reason to do this but I have to for school and I can't find an answer anywhere. Removing my write permission works fine but when I try to remove my read permission it automatically give me my read and write permissions back. As you can see in the console when I use chmod -v -v (extra verbose) it shows the correct permissions it should be changed to but then when checking afterwards they havent changed into that...
thijs#Thijss-MacBook-Air-2 week6 % ls -l
total 16
-rw----r-- 1 thijs staff 12 Oct 11 21:10 greeting.txt
-rw-r--r-- 1 thijs staff 0 Oct 11 21:10 hello.txt
-rw------- 1 thijs staff 15 Oct 11 21:11 weather.txt
thijs#Thijss-MacBook-Air-2 week6 % chmod -v -v u-w weather.txt
weather.txt: 0100600 [-rw------- ] -> 0100400 [-r-------- ]
thijs#Thijss-MacBook-Air-2 week6 % ls -l
total 16
-rw----r-- 1 thijs staff 12 Oct 11 21:10 greeting.txt
-rw-r--r-- 1 thijs staff 0 Oct 11 21:10 hello.txt
-r-------- 1 thijs staff 15 Oct 11 21:11 weather.txt
thijs#Thijss-MacBook-Air-2 week6 % chmod -v -v u-r weather.txt
weather.txt: 0100400 [-r-------- ] -> 0100000 [---------- ]
thijs#Thijss-MacBook-Air-2 week6 % ls -l
total 16
-rw----r-- 1 thijs staff 12 Oct 11 21:10 greeting.txt
-rw-r--r-- 1 thijs staff 0 Oct 11 21:10 hello.txt
-rw------- 1 thijs staff 15 Oct 11 21:11 weather.txt

How to touch files with different names and different date created

I am trying to create files with different date created:
$ touch -t 20{11..15}01120000 file_{1..5}.txt
$ ls -al
-rw-r--r-- 1 shinokada staff 0 Jan 12 2011 201201120000
-rw-r--r-- 1 shinokada staff 0 Jan 12 2011 201301120000
-rw-r--r-- 1 shinokada staff 0 Jan 12 2011 201401120000
-rw-r--r-- 1 shinokada staff 0 Jan 12 2011 201501120000
-rw-r--r-- 1 shinokada staff 0 Jan 12 2011 file_1.txt
-rw-r--r-- 1 shinokada staff 0 Jan 12 2011 file_2.txt
-rw-r--r-- 1 shinokada staff 0 Jan 12 2011 file_3.txt
-rw-r--r-- 1 shinokada staff 0 Jan 12 2011 file_4.txt
-rw-r--r-- 1 shinokada staff 0 Jan 12 2011 file_5.txt
As you can see all file's dates created are 2011 Jan 12 0.
How can I create files with a different year?
# this is what I want
-rw-r--r-- 1 shinokada staff 0 Jan 12 2011 file_1.txt
-rw-r--r-- 1 shinokada staff 0 Jan 12 2012 file_2.txt
-rw-r--r-- 1 shinokada staff 0 Jan 12 2013 file_3.txt
-rw-r--r-- 1 shinokada staff 0 Jan 12 2014 file_4.txt
-rw-r--r-- 1 shinokada staff 0 Jan 12 2015 file_5.txt
What is the best way?
touch command allows you to enter one one timestamp using -t option.
A traditional for-loop would be better:
for i in {1..5}; do touch -t 201${i}01120000 file_$i.txt; done
Shortly, but keeping filenumbers and years as separated variables
I think this is more readable, but...
Care about timezone!
filenum=1
for year in {2011..2015};do
TZ=UTC touch -t ${year}12312345 file-$((filenum++))
done
Then if you look about this, using a different timezone:
(Note that created date was Dec 31, 23h45')
TZ=UTC-1 ls -ltr
-rw-r--r-- 1 user user 0 jan 1 2012 file-1
-rw-r--r-- 1 user user 0 jan 1 2013 file-2
-rw-r--r-- 1 user user 0 jan 1 2014 file-3
-rw-r--r-- 1 user user 0 jan 1 2015 file-4
-rw-r--r-- 1 user user 0 jan 1 2016 file-5
Could you please try following, I would go with following approach with a for loop. Where I am providing year, number of files which needed, output file's initial value and same time value for all output files so that we can manage it in for loop.
cat script.bash
year=2011
numberoffiles="10"
time="01120000"
outputfileInitials="file"
nameSequence="1"
for ((i = 1 ; i <= numberoffiles ; i++ ));
do
touch -t $year$time "${outputfileInitials}_$nameSequence.txt"
(( nameSequence = nameSequence + 1 ))
(( year = year + 1 ))
done

Symfony2 : can't duplicate site because of strange folders architecture

I have to retrieve an existing symfony2 (2.1.13) project from prod server in order to run it locally to make some changes. The problem is the architecture seems to be a little bit strange. Please have a look on it :
$pwd
/var/www/html/sites/www.mysite.com
drwxr-xr-x 2 ... 4.0K Jun 30 09:30 backups/
drwxr-x--- 2 ... 6 Mar 15 2013 cgi-bin/
drwxr-xr-x 4 ... 41 Aug 10 18:09 _copie1/
drwxr-xr-x 2 ... 6 Apr 25 2014 log/
drwxr-xr-x 12 ... 4.0K Aug 11 15:41 releases/
drwxr-xr-x 7 ... 146 May 12 16:46 repo/
drwxr-xr-x 5 ... 85 May 12 16:49 shared/
lrwxrwxrwx 1 ... 58 Jul 6 15:11 current -> /var/www/html/sites/www.mysite.com/releases/201508/
lrwxrwxrwx 1 ... 12 Mar 28 2013 html -> current/web//
-rw-r--r-- 1 ... 1022 Jul 6 15:11 revisions.log
current/
drwxr-xr-x 6 ... 4.0K Jul 6 15:09 app/
drwxr-xr-x 2 ... 124 Jul 6 15:05 bin/
drwxr-xr-x 4 ... 50 Aug 11 14:54 src/
drwxr-xr-x 35 ... 4.0K Aug 11 12:08 vendor/
drwxr-xr-x 5 ... 4.0K Aug 11 18:28 web/
-rw-r--r-- 1 ... 626 Jul 6 15:05 Capfile
-rw-r--r-- 1 ... 4.1K Jul 6 15:05 composer.json
-rw-r--r-- 1 ... 167K Jul 6 15:05 composer.lock
-rw-r--r-- 1 ... 216 Jul 6 15:05 Gemfile
-rw-r--r-- 1 ... 1.2K Jul 6 15:05 Gemfile.lock
-rw-r--r-- 1 ... 1.1K Jul 6 15:05 LICENSE
-rw-r--r-- 1 ... 1.6K Jul 6 15:05 README.md
-rw-r--r-- 1 ... 8 Jul 6 15:06 REVISION
-rw-r--r-- 1 ... 7.7K Jul 6 15:05 UPGRADE.md
-rw-r--r-- 1 ... 7 Jul 6 15:05 VERSION
current/web/
drwxr-xr-x 2 ... 4.0K Aug 11 12:10 bundles/
drwxr-xr-x 4 ... 4.0K Jul 6 15:11 compiled/
drwxr-xr-x 2 ... 47 Jul 6 15:11 js/
-rw-r--r-- 1 ... 46K Jul 6 15:11 apc.php
-rw-r--r-- 1 ... 11K Jul 6 15:05 apple-touch-icon.png
-rw-r--r-- 1 ... 7.0K Jul 6 15:05 apple-touch-icon-precomposed.png
-rw-r--r-- 1 ... 728 Jul 6 15:05 app.php
-rw-r--r-- 1 ... 33K Jul 6 15:05 favicon.ico
-rw-r--r-- 1 ... 20K Jul 6 15:05 favicon.jpg
-rw-r--r-- 1 ... 4.6K Jul 6 15:05 favicon.png
lrwxrwxrwx 1 ... 51 Jul 6 15:06 image -> /var/www/html/sites/www.mysite.com/shared/web/image/
lrwxrwxrwx 1 ... 52 Jul 6 15:06 medias -> /var/www/html/sites/www.mysite.com/shared/web/medias/
-rw-r--r-- 1 ... 66 Aug 10 12:28 robots.txt
-rw-r--r-- 1 ... 2.2M Aug 11 03:00 sitemap.xml
current/web/bundles/
lrwxrwxrwx 1 ... 147 Jul 6 15:09 bazingaexposetranslation -> /var/www/html/sites/www.mysite.com/releases/201508/vendor/willdurand/js-translation-bundle/Bazinga/ExposeTranslationBundle/Resources/public/
lrwxrwxrwx 1 ... 121 Jul 6 15:09 ericharddms -> /var/www/html/sites/www.mysite.com/releases/201508/vendor/erichard/dms-bundle/Erichard/DmsBundle/Resources/public/
lrwxrwxrwx 1 ... 126 Jul 6 15:09 farosadmin -> /var/www/html/sites/www.mysite.com/releases/201508/vendor/faros/admin-bundle-legacy/Faros/AdminBundle/Resources/public/
lrwxrwxrwx 1 ... 125 Jul 6 15:09 faroselfinder -> /var/www/html/sites/www.mysite.com/releases/201508/vendor/faros/elfinder-bundle/Faros/ElFinderBundle/Resources/public/
lrwxrwxrwx 1 ... 113 Jul 6 15:09 farosqb -> /var/www/html/sites/www.mysite.com/releases/201508/vendor/faros/qb-bundle/Faros/QBBundle/Resources/public/
lrwxrwxrwx 1 ... 116 Jul 6 15:09 fosjsrouting -> /var/www/html/sites/www.mysite.com/releases/201508/vendor/friendsofsymfony/jsrouting-bundle/Resources/public/
lrwxrwxrwx 1 ... 133 Jul 6 15:09 framework -> /var/www/html/sites/www.mysite.com/releases/201508/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/public/
lrwxrwxrwx 1 ... 132 Jul 6 15:09 mopabootstrap -> /var/www/html/sites/www.mysite.com/releases/201508/vendor/mopa/bootstrap-bundle/Mopa/Bundle/BootstrapBundle/Resources/public/
lrwxrwxrwx 1 ... 129 Jul 6 15:09 trsteelckeditor -> /var/www/html/sites/www.mysite.com/releases/201508/vendor/trsteel/ckeditor-bundle/Trsteel/CkeditorBundle/Resources/public/
lrwxrwxrwx 1 ... 99 Jul 6 15:09 mysiteadmin -> /var/www/html/sites/www.mysite.com/releases/201508/src/mysite/AdminBundle/Resources/public/
lrwxrwxrwx 1 ... 98 Jul 6 15:09 mysitesite -> /var/www/html/sites/www.mysite.com/releases/201508/src/mysite/SiteBundle/Resources/public/
current/app/
drwxr-xr-x 4 ... 27 Aug 11 18:32 cache/
drwxr-xr-x 3 ... 4.0K Aug 11 12:12 config/
drwxr-xr-x 2 ... 4.0K Jul 6 15:05 DoctrineMigrations/
drwxr-xr-x 8 ... 105 Jul 6 15:06 Resources/
-rw-r--r-- 1 ... 141 Jul 6 15:05 AppCache.php
-rw-r--r-- 1 ... 4.3K Jul 6 15:05 AppKernel.php
-rw-r--r-- 1 ... 474 Jul 6 15:05 autoload.php
-rw-r--r-- 1 ... 48K Jul 6 15:09 bootstrap.php.cache
-rw-r--r-- 1 ... 1.7K Jul 6 15:09 check.php
-rwxr-xr-x 1 ... 794 Jul 6 15:05 console*
lrwxrwxrwx 1 ... 50 Jul 6 15:06 logs -> /var/www/html/sites/www.mysite.com/shared/app/logs/
-rw-r--r-- 1 ... 1.7K Jul 6 15:05 phpunit.xml.dist
-rw-r--r-- 1 ... 26K Jul 6 15:09 SymfonyRequirements.php
lrwxrwxrwx 1 ... 49 Jul 6 15:06 var -> /var/www/html/sites/www.mysite.com/shared/app/var/
As you can see there are so many symlinks :(
I have a new installation of symfony 2.1.13 on my wamp server, so :
1. What should I exactly copy from the server ?
2. And where to copy ?
3. How to configure files like AppKernel.php, config.php, parameters.yml ...
Thanks :)
Looks like you are stepped to the task from apposite side
First of all "strange" folders architecture is comming from the nature of the deployment tool "capifony". You can see folder "releases" that keeps all history of releases deployed and folder(symlink) "current" that points to the latest(current) release. Also you can see some symlinks to the folder "shared" that suppose to keep some content that doesn't suppose change from deploy to deploy (like images, logs).
It is possible to explain long how capifony works, but seems it is better to get some quick overview http://capifony.org/
In short words I can say that you can copy the site to local, but it is not the best way. I suppose you need to clone the project from its repository(most probably git) and setup parameters.yml
You should not change AppKernel.php or config.php
Clone the respository and looks for app/config/parameters.yml.dist that will(should) have initial configuration for the project
PS: you should not copy "current/web/bundles/" but should use "assets install" command to create these assets
PPS: And I believe you should to learn some symfony docs(at least basic) before start to copy the site

Bash script working but fails in crontab

I am having issues with this script/cron. I am running on a Raspberry pi and I have other cronjobs working just fine(so I know its not cron on the system).
My script:
#!/bin/bash
rm -f /var/www/output/*
This script is working just fine in the command line
bash clearcsv.sh
but when I try to turn it in to a cronjob, it seems that it is not executing
Cron script: */6 * * * * /home/pi/clearcsv.sh
This should erase the contents of the "output" folder every 6 minutes, but it does not. If someone could tell me where I am failing or point me in the right direction that would be great
Thanks
total 160
drwxrwxrwx 14 pi pi 4096 Mar 13 16:41 .
drwxr-xr-x 3 root root 4096 Dec 31 1969 ..
-rw-r--r-- 1 pi pi 0 Mar 10 21:56 ?
-rwxrwxrwx 1 pi pi 8700 Mar 13 15:32 .bash_history
-rwxrwxrwx 1 pi pi 220 Jan 7 16:10 .bash_logout
-rwxrwxrwx 1 pi pi 3243 Jan 7 16:10 .bashrc
drwxrwxrwx 8 pi pi 4096 Mar 10 19:24 .cache
-rwxrwxrwx 1 pi pi 41 Mar 13 16:11 clearcsv.sh
drwxrwxrwx 12 pi pi 4096 Feb 12 18:21 .config
-rwxrwxrwx 1 pi pi 420 Mar 13 17:02 csv.sh
drwxrwxrwx 2 pi pi 4096 Feb 12 18:20 Desktop
-rw-r--r-- 1 pi pi 35 Mar 7 08:17 .dmrc
drwxrwxrwx 2 pi pi 4096 Jan 16 13:32 .fontconfig
drwxrwxrwx 2 pi indiecity 4096 Jan 16 13:34 .gstreamer-0.10
drwxrwxrwx 2 pi pi 4096 Jan 16 13:32 .gvfs
drwxrwxrwx 3 pi pi 4096 Jan 16 13:33 indiecity
drwxrwxrwx 2 pi pi 4096 Mar 13 13:27 input
drwxrwxrwx 3 pi pi 4096 Jan 16 13:33 .local
drwxrwxrwx 9 pi pi 4096 Jan 16 14:30 .Mathematica
-rwxrwxrwx 1 pi pi 5781 Feb 3 2013 ocr_pi.png
-rwxrwxrwx 1 pi pi 0 Mar 10 18:24 output.csv
-rwxrwxrwx 1 pi pi 671 Mar 13 13:39 poller.sh
-rwxrwxrwx 1 pi pi 117 Feb 19 17:34 poll.sh
-rwxrwxrwx 1 pi pi 675 Jan 7 16:10 .profile
-rw-r--r-- 1 root root 3 Jan 16 14:09 restart
drwx------ 4 pi pi 4096 Mar 13 13:22 .thumbnails
-rwxrwxrwx 1 pi pi 56 Mar 7 08:17 .Xauthority
-rw------- 1 pi pi 17227 Mar 13 16:56 .xsession-errors
-rwxrwxrwx 1 pi pi 2385 Mar 6 19:06 .xsession-errors.old
Thank you all for your help. I have everything working now! Here is the code if you are interested
New Script used:
#!/bin/bash
/bin/rm -f /var/www/output/*
Cron
*/6 * * * * cd /home/pi && bash clearcsv.sh

Resources