小编Bar*_*vza的帖子

无法在 docker-compose 中向 docker 卷添加写入权限

问题

\n\n

我的主要目标是在我的 Linux 机器上创建一个 WordPress 容器,以便在该容器上进行开发。

\n\n

因此,我正在为pluginsthemes文件夹创建新卷,甚至read & write使用该:rw选项添加权限。

\n\n

但是,当我尝试在这些“卷”中创建新目录或文件时,我收到一条错误消息(尤其是在 VS Code 中),表明我没有添加这些卷的权限。

\n\n

而且,基于命令的权限ll表明所有者是唯一拥有该w权限的人。这意味着我无法使用该组www-data并将其添加到我的用户来编辑这些卷。

\n\n

当我尝试运行时chmod 766 themes plugins,卷不再绑定,因此该解决方案不起作用。

\n\n

我搜索了整个网络(包括堆栈溢出),但没有一个答案对我不起作用,所以我迷失了:(

\n\n

以下是一些可以帮助您找到解决方案的详细信息,包括docker-compose.yml文件。

\n\n

细节

\n\n

尝试添加名为的目录时 VS Code 出错hello

\n\n
A system error occurred (EACCES: permission denied, mkdir \'~/Workspace/WordpressProject/themes/hello\')\n
Run Code Online (Sandbox Code Playgroud)\n\n

在终端运行mkdir hello,返回此错误

\n\n

mkdir: cannot create directory \xe2\x80\x98hello\xe2\x80\x99: Permission denied

\n\n

ll卷的命令结果 …

permissions wordpress volumes docker docker-compose

3
推荐指数
1
解决办法
1万
查看次数

IntelliJ 无法识别 Scala 中的 TypeTag

我正在尝试在Scala 中编译这两行代码(使用 Gradle):

import import scala.reflect.runtime.universe._
val typeInt = typeTag[Int]
Run Code Online (Sandbox Code Playgroud)

事实证明,IntelliJ 以某种方式将单词标记为runtime红色。并向我抛出这个错误:object runtime is not a member of package reflect one error found

现在,对我来说奇怪的是,当我使用 Scala REPL 时,它发现这个包没有任何问题

scala> import scala.reflect.runtime.universe._
import scala.reflect.runtime.universe._

scala> val typeInt = typeTag[Int]
val typeInt: reflect.runtime.universe.TypeTag[Int] = TypeTag[Int]
Run Code Online (Sandbox Code Playgroud)

Gradle 的build.gradle文件

plugins {
    id 'java-library'
    id 'scala'
    id 'com.github.maiflai.scalatest' version '0.26'
}

repositories {
    jcenter()
}

dependencies {
    implementation 'org.scala-lang:scala-library:2.13.3'
    implementation 'com.fasterxml.jackson.module:jackson-module-scala_2.13:2.9.9'
    implementation 'com.typesafe:config:1.4.0'
    testCompile 'org.scalamock:scalamock_2.13:4.4.0'
    testCompile 'org.scalatest:scalatest_2.13:3.1.2' …
Run Code Online (Sandbox Code Playgroud)

java reflection scala intellij-idea gradle

1
推荐指数
1
解决办法
97
查看次数