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

docker image from sbt docker:publishLocal fails with "Failed to create parent directories for [/opt/docker/./logs/application.json]" #1361

Closed
briancaffey opened this issue Aug 19, 2020 · 6 comments
Labels

Comments

@briancaffey
Copy link

briancaffey commented Aug 19, 2020

Expected behaviour

A docker image built by sbt docker:publishLocal fails to run succesfully.

Actual behaviour

sbt docker:publishLocal creates a docker image, but that image fails with the following:

08:07:18,293 |-ERROR in ch.qos.logback.core.FileAppender[JSON] - Failed to create parent directories for [/opt/docker/./logs/application.json]
08:07:18,293 |-ERROR in ch.qos.logback.core.FileAppender[JSON] - openFile(./logs/application.json,true) call failed. java.io.FileNotFoundException: ./logs/application.json (No such file or directory)

Information

  • What sbt-native-packager are you using
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.4")
  • What sbt version
1.3.4
  • What is your build system (e.g. Ubuntu, MacOS, Windows, Debian )
    Ubuntu 18.04
  • What package are you building (e.g. docker, rpm, ...)
    docker image from sbt docker:publishLocal

Error Logs

sbt docker:publishLocal creates an image locally:

$ docker image ls
REPOSITORY                    TAG                 IMAGE ID            CREATED             SIZE
play-scala-rest-api-example   1.0-SNAPSHOT        ac947d225da3        7 hours ago         561MB

When I try to run this image with

docker run -p 5000:9000 play-scala-rest-api-example:1.0-SNAPSHOT 

I get the following errors:

08:07:17,922 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
08:07:17,922 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
08:07:17,922 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/opt/docker/conf/logback.xml]
08:07:17,965 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
08:07:17,965 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word coloredLevel with class [play.api.libs.logback.ColoredLevel]
08:07:17,966 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.FileAppender]
08:07:17,973 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
08:07:17,980 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
08:07:18,006 |-INFO in ch.qos.logback.core.FileAppender[FILE] - File property is set to [./logs/application.log]
08:07:18,006 |-ERROR in ch.qos.logback.core.FileAppender[FILE] - Failed to create parent directories for [/opt/docker/./logs/application.log]
08:07:18,007 |-ERROR in ch.qos.logback.core.FileAppender[FILE] - openFile(./logs/application.log,true) call failed. java.io.FileNotFoundException: ./logs/application.log (No such file or directory)
        at java.io.FileNotFoundException: ./logs/application.log (No such file or directory)
        at      at java.io.FileOutputStream.open0(Native Method)
        at      at java.io.FileOutputStream.open(FileOutputStream.java:270)
        at      at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at      at ch.qos.logback.core.recovery.ResilientFileOutputStream.<init>(ResilientFileOutputStream.java:26)
        at      at ch.qos.logback.core.FileAppender.openFile(FileAppender.java:204)
        at      at ch.qos.logback.core.FileAppender.start(FileAppender.java:127)
        at      at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:90)
        at      at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:309)
        at      at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:193)
        at      at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:179)
        at      at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
        at      at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
        at      at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
        at      at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
        at      at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
        at      at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
        at      at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
        at      at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
        at      at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
        at      at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
        at      at play.api.Logger$.<clinit>(Logger.scala:265)
        at      at play.api.Configuration$.<clinit>(Configuration.scala:164)
        at      at play.core.server.ProdServerStart$.readServerConfigSettings(ProdServerStart.scala:103)
        at      at play.core.server.ProdServerStart$.start(ProdServerStart.scala:43)
        at      at play.core.server.ProdServerStart$.main(ProdServerStart.scala:30)
        at      at play.core.server.ProdServerStart.main(ProdServerStart.scala)
08:07:18,007 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.FileAppender]
08:07:18,007 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [JSON]
08:07:18,019 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [net.logstash.logback.composite.loggingevent.LoggingEventJsonProviders] for [providers] property
08:07:18,032 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [net.logstash.logback.composite.loggingevent.LoggingEventFormattedTimestampJsonProvider] for [timestamp] property
08:07:18,033 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [net.logstash.logback.composite.loggingevent.LogLevelJsonProvider] for [logLevel] property
08:07:18,034 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [net.logstash.logback.composite.loggingevent.LoggerNameJsonProvider] for [loggerName] property
08:07:18,034 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [net.logstash.logback.composite.loggingevent.ThreadNameJsonProvider] for [threadName] property
08:07:18,034 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [net.logstash.logback.composite.loggingevent.MessageJsonProvider] for [message] property
08:07:18,035 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [net.logstash.logback.composite.loggingevent.LogstashMarkersJsonProvider] for [logstashMarkers] property
08:07:18,035 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [net.logstash.logback.composite.loggingevent.ArgumentsJsonProvider] for [arguments] property
08:07:18,035 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [net.logstash.logback.composite.loggingevent.StackTraceJsonProvider] for [stackTrace] property
08:07:18,293 |-INFO in ch.qos.logback.core.FileAppender[JSON] - File property is set to [./logs/application.json]
08:07:18,293 |-ERROR in ch.qos.logback.core.FileAppender[JSON] - Failed to create parent directories for [/opt/docker/./logs/application.json]
08:07:18,293 |-ERROR in ch.qos.logback.core.FileAppender[JSON] - openFile(./logs/application.json,true) call failed. java.io.FileNotFoundException: ./logs/application.json (No such file or directory)
        at java.io.FileNotFoundException: ./logs/application.json (No such file or directory)
        at      at java.io.FileOutputStream.open0(Native Method)
        at      at java.io.FileOutputStream.open(FileOutputStream.java:270)
        at      at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at      at ch.qos.logback.core.recovery.ResilientFileOutputStream.<init>(ResilientFileOutputStream.java:26)
        at      at ch.qos.logback.core.FileAppender.openFile(FileAppender.java:204)
        at      at ch.qos.logback.core.FileAppender.start(FileAppender.java:127)
        at      at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:90)
        at      at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:309)
        at      at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:193)
        at      at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:179)
        at      at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
        at      at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
        at      at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
        at      at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
        at      at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
        at      at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
        at      at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
        at      at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
        at      at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
        at      at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
        at      at play.api.Logger$.<clinit>(Logger.scala:265)
        at      at play.api.Configuration$.<clinit>(Configuration.scala:164)
        at      at play.core.server.ProdServerStart$.readServerConfigSettings(ProdServerStart.scala:103)
        at      at play.core.server.ProdServerStart$.start(ProdServerStart.scala:43)
        at      at play.core.server.ProdServerStart$.main(ProdServerStart.scala:30)
        at      at play.core.server.ProdServerStart.main(ProdServerStart.scala)
08:07:18,293 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.FileAppender]
08:07:18,293 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [METRICS]
08:07:18,293 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
08:07:18,294 |-INFO in ch.qos.logback.core.FileAppender[METRICS] - File property is set to [./logs/metrics.log]
08:07:18,294 |-ERROR in ch.qos.logback.core.FileAppender[METRICS] - Failed to create parent directories for [/opt/docker/./logs/metrics.log]
08:07:18,294 |-ERROR in ch.qos.logback.core.FileAppender[METRICS] - openFile(./logs/metrics.log,true) call failed. java.io.FileNotFoundException: ./logs/metrics.log (No such file or directory)
        at java.io.FileNotFoundException: ./logs/metrics.log (No such file or directory)
        at      at java.io.FileOutputStream.open0(Native Method)
        at      at java.io.FileOutputStream.open(FileOutputStream.java:270)
        at      at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at      at ch.qos.logback.core.recovery.ResilientFileOutputStream.<init>(ResilientFileOutputStream.java:26)
        at      at ch.qos.logback.core.FileAppender.openFile(FileAppender.java:204)
        at      at ch.qos.logback.core.FileAppender.start(FileAppender.java:127)
        at      at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:90)
        at      at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:309)
        at      at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:193)
        at      at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:179)
        at      at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
        at      at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
        at      at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
        at      at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
        at      at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
        at      at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
        at      at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
        at      at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
        at      at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
        at      at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
        at      at play.api.Logger$.<clinit>(Logger.scala:265)
        at      at play.api.Configuration$.<clinit>(Configuration.scala:164)
        at      at play.core.server.ProdServerStart$.readServerConfigSettings(ProdServerStart.scala:103)
        at      at play.core.server.ProdServerStart$.start(ProdServerStart.scala:43)
        at      at play.core.server.ProdServerStart$.main(ProdServerStart.scala:30)
        at      at play.core.server.ProdServerStart.main(ProdServerStart.scala)
08:07:18,294 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
08:07:18,296 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
08:07:18,296 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
08:07:18,298 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.AsyncAppender]
08:07:18,299 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ASYNCFILE]
08:07:18,299 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to ch.qos.logback.classic.AsyncAppender[ASYNCFILE]
08:07:18,299 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNCFILE] - Attaching appender named [FILE] to AsyncAppender.
08:07:18,299 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNCFILE] - Setting discardingThreshold to 51
08:07:18,299 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.AsyncAppender]
08:07:18,299 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ASYNCJSON]
08:07:18,299 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [JSON] to ch.qos.logback.classic.AsyncAppender[ASYNCJSON]
08:07:18,299 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNCJSON] - Attaching appender named [JSON] to AsyncAppender.
08:07:18,299 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNCJSON] - Setting discardingThreshold to 51
08:07:18,299 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.AsyncAppender]
08:07:18,299 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [ASYNCSTDOUT]
08:07:18,299 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to ch.qos.logback.classic.AsyncAppender[ASYNCSTDOUT]
08:07:18,299 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNCSTDOUT] - Attaching appender named [STDOUT] to AsyncAppender.
08:07:18,299 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNCSTDOUT] - Setting discardingThreshold to 51
08:07:18,300 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [play] to INFO
08:07:18,300 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [application] to DEBUG
08:07:18,300 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [v1.post] to TRACE
08:07:18,300 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to WARN
08:07:18,300 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ASYNCFILE] to Logger[ROOT]
08:07:18,300 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ASYNCJSON] to Logger[ROOT]
08:07:18,300 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ASYNCSTDOUT] to Logger[ROOT]
08:07:18,300 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
08:07:18,300 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@6fdbe764 - Registering current configuration as safe fallback point

Oops, cannot start the server.
java.nio.file.AccessDeniedException: /opt/docker/RUNNING_PID
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
        at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
        at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
        at java.nio.file.Files.newOutputStream(Files.java:216)
        at play.core.server.ProdServerStart$.createPidFile(ProdServerStart.scala:148)
        at play.core.server.ProdServerStart$.start(ProdServerStart.scala:46)
        at play.core.server.ProdServerStart$.main(ProdServerStart.scala:30)
        at play.core.server.ProdServerStart.main(ProdServerStart.scala)

Also, here is the result of sbt docker:stage:

FROM openjdk:8 as stage0
LABEL snp-multi-stage="intermediate"
LABEL snp-multi-stage-id="1b33f71f-1ea4-431e-9fb1-16f5bc1e4ab2"
WORKDIR /opt/docker
COPY opt /opt
COPY 1/opt /1/opt
USER root
RUN ["chmod", "-R", "u=rX,g=rX", "/opt/docker"]
RUN ["chmod", "-R", "u=rX,g=rX", "/1/opt/docker"]
RUN ["chmod", "u+x,g+x", "/1/opt/docker/bin/play-scala-rest-api-example"]

FROM openjdk:8 as mainstage
USER root
RUN id -u demiourgos728 1>/dev/null 2>&1 || (( getent group 0 1>/dev/null 2>&1 || ( type groupadd 1>/dev/null 2>&1 && groupadd -g 0 root || addgroup -g 0 -S root )) && ( type useradd 1>/dev/null 2>&1 && useradd --system --create-home --uid 1001 --gid 0 demiourgos728 || adduser -S -u 1001 -G root demiourgos728 ))
WORKDIR /opt/docker
COPY --from=stage0 --chown=demiourgos728:root /opt/docker /opt/docker
COPY --from=stage0 --chown=demiourgos728:root /1/opt/docker /opt/docker
USER 1001:0
ENTRYPOINT ["/opt/docker/bin/play-scala-rest-api-example"]
CMD []

@muuki88 muuki88 added the docker label Aug 20, 2020
@muuki88
Copy link
Contributor

muuki88 commented Aug 20, 2020

Thanks @briancaffey for your question.

This is docker + logback configuration issue. Docker containers are isolated. If you try to access a path on the filesystem, as logback tries to do with the file appender

openFile(./logs/metrics.log,true) call failed. java.io.FileNotFoundException: ./logs/metrics.log (No such file or directory)
at java.io.FileNotFoundException: ./logs/metrics.log (No such file or directory)

or the play framework with the pid file

java.nio.file.AccessDeniedException: /opt/docker/RUNNING_PID

and you haven't mounted a volume where the running docker image can access these file, you'll get the errors you see.

For play this is a year standing issue. You can disable the pid file by following this documentation ("Play PID Configuration")f

@muuki88 muuki88 closed this as completed Aug 20, 2020
@briancaffey
Copy link
Author

Thank you @muuki88 I'll try working through this with your suggestions.

@remover
Copy link

remover commented Jan 29, 2021

@briancaffey did you find a solution to this? i tried following the linked section above but same result :(

1 similar comment
@remover
Copy link

remover commented Jan 29, 2021

@briancaffey did you find a solution to this? i tried following the linked section above but same result :(

@muuki88
Copy link
Contributor

muuki88 commented Feb 1, 2021

See customize runtime parameters and in your build.sbt

Universal / javaOptions ++= Seq(
  // don't write any pid files
  -Dpidfile.path=/dev/null,
  // reference a logback config file that has no file appenders
  -Dlogback.configurationFile=logback-prod.xml
)

Example of a logback config with no file appenders

<configuration>

  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <!-- encoders are assigned the type
         ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
    <encoder>
      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
  </appender>

  <root level="debug">
    <appender-ref ref="STDOUT" />
  </root>
</configuration>

taken from the logback documentation

@eugeniyk
Copy link

You can manually create folders inside docker?

dockerCommands ++= Seq(
  // Optional step - declare folders for logs if not mounted to the host
  ExecCmd("RUN", "mkdir", "-p", "/opt/docker/logs/"),
  ExecCmd("RUN", "chmod", "+w", "-R", "/opt/docker/logs/")
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants