Comments (2)
Left the same comment on the Moby issue:
I should have paid closer attention to the "access denied" error that came back in my trace. Turns out this is permissions related and should hopefully be pretty straightforward to address (just need to find the least privilege to be granted, noting that NTFS junctions historically required admin privileges in Windows, and that changed a bit in Windows 10 - see https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/)
Create the volume
PS C:\WINDOWS\system32> docker volume create pg
pg
Find the volume location on disk
PS C:\WINDOWS\system32> docker volume inspect pg
[
{
"CreatedAt": "2019-09-13T16:38:28-07:00",
"Driver": "local",
"Labels": {},
"Mountpoint": "C:\\ProgramData\\docker\\volumes\\pg\\_data",
"Name": "pg",
"Options": {},
"Scope": "local"
}
]
Get current permissions
PS C:\WINDOWS\system32> icacls C:\\ProgramData\\docker\\volumes\\pg\\_data
C:\\ProgramData\\docker\\volumes\\pg\\_data BUILTIN\Administrators:(I)(OI)(CI)(F)
NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
CI-LCOW-PROD-4\puppet:(I)(OI)(CI)(F)
Successfully processed 1 files; Failed processing 0 files
Grant Full permissions to the Windows users group
PS C:\WINDOWS\system32> icacls C:\\ProgramData\\docker\\volumes\\pg\\_data /grant Users:"(OI)(CI)F" /T
processed file: C:\\ProgramData\\docker\\volumes\\pg\\_data
Successfully processed 1 files; Failed processing 0 files
And read them back
PS C:\WINDOWS\system32> icacls C:\\ProgramData\\docker\\volumes\\pg\\_data
C:\\ProgramData\\docker\\volumes\\pg\\_data BUILTIN\Users:(OI)(CI)(F)
BUILTIN\Administrators:(I)(OI)(CI)(F)
NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
CI-LCOW-PROD-4\puppet:(I)(OI)(CI)(F)
Successfully processed 1 files; Failed processing 0 files
Start Postgres with the named volume
PS C:\WINDOWS\system32> docker run --volume pg:/var/lib/postgresql/data postgres:9.6
Postgres output - success!
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default timezone ... Etc/UTC
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
Success. You can now start the database server using:
<snip startup stuff/>
PostgreSQL init process complete; ready for start up.
LOG: database system was shut down at 2019-09-13 23:40:07 UTC
LOG: MultiXact member wraparound protections are now enabled
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
from opengcs.
Wow @Iristyle you're a rockstar! Thanks so much for sharing your results. I was having the exact same problem and I would certainly give up before finding the way you came up with!
from opengcs.
Related Issues (20)
- execProcess should handle v2 external process
- V2 should support hot add/remove of NIC
- V2 exec process should consider UVMId
- Shutdown of UVM should send response to HCS
- bridge should make sure kernel version is 4.14.23 or greater
- In stress test, failed to get SCSI device name HOT 2
- [feature request] add version parameter HOT 2
- Error on run container with transparent network HOT 2
- Unspecified Error (0X80004005) and Failed to connect NIC
- init does too little and too much
- File ULIMITs HOT 1
- Intermittent DNS failures when running Alpine containers in user-defined docker-compose network
- vet error: set declared but not used HOT 1
- some "docker exec" commands fail with a cryptic error HOT 3
- json.Unmarshal is incorrectly used
- json.Unmarshal is incorrectly used
- I would like to ask for some wrong answers HOT 4
- OT: Where to find tools/information about Hyper-V root on Linux
- Who owns C:\Program Files\Linux Containers? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opengcs.