fix(api): disable data directory creation (#495)

* fix(api): disable data directory creation

* feat(dockerhub): update volume instruction value for Windows Dockerfiles
pull/526/head
Anthony Lapenna 2017-01-14 14:22:39 +13:00 committed by GitHub
parent cd26051144
commit e4d98082dc
3 changed files with 9 additions and 7 deletions

View File

@ -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
}

View File

@ -2,7 +2,7 @@ FROM microsoft/windowsservercore
COPY dist /
VOLUME C:\\data
VOLUME C:\\ProgramData\\Portainer
WORKDIR /

View File

@ -2,7 +2,7 @@ FROM microsoft/nanoserver
COPY dist /
VOLUME C:\\data
VOLUME C:\\ProgramData\\Portainer
WORKDIR /