mirror of https://github.com/portainer/portainer
fix(api): disable data directory creation (#495)
* fix(api): disable data directory creation * feat(dockerhub): update volume instruction value for Windows Dockerfilespull/526/head
parent
cd26051144
commit
e4d98082dc
|
@ -34,12 +34,14 @@ func NewService(dataStorePath, fileStorePath string) (*Service, error) {
|
|||
fileStorePath: path.Join(dataStorePath, fileStorePath),
|
||||
}
|
||||
|
||||
err := createDirectoryIfNotExist(dataStorePath, 0755)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// Checking if a mount directory exists is broken with Go on Windows.
|
||||
// This will need to be reviewed after the issue has been fixed in Go.
|
||||
// err := createDirectoryIfNotExist(dataStorePath, 0755)
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
|
||||
err = service.createDirectoryInStoreIfNotExist(TLSStorePath)
|
||||
err := service.createDirectoryInStoreIfNotExist(TLSStorePath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ FROM microsoft/windowsservercore
|
|||
|
||||
COPY dist /
|
||||
|
||||
VOLUME C:\\data
|
||||
VOLUME C:\\ProgramData\\Portainer
|
||||
|
||||
WORKDIR /
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ FROM microsoft/nanoserver
|
|||
|
||||
COPY dist /
|
||||
|
||||
VOLUME C:\\data
|
||||
VOLUME C:\\ProgramData\\Portainer
|
||||
|
||||
WORKDIR /
|
||||
|
||||
|
|
Loading…
Reference in New Issue