我在windows上使用docker。通过使用kitematic,我创建了一个ubuntu容器。这个ubuntu映像上安装了postgresql。
想知道是否有可能从主机(Windows机器)访问容器中可用的postgres配置文件?
容器在哪里确实将其文件系统存储在主机上?
我希望它是图像文件的一部分,格式为VMDK
如果我错了,请纠正我。
答案 0 :(得分:1)
想知道是否有可能从主机(windows机器)访问容器中可用的postgres配置文件
这不是Docker允许您修改容器中文件的方式 为此,您应该在启动(docker run -v)容器时安装主机(Windows)文件夹 请参阅“Mount a host directory as a data volume”
~/Library/Application Support/Kitematic
Issue 247提到了private static final int PICK_FROM_GALLERY = 1;
ChoosePhoto.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick (View v){
try {
if (ActivityCompat.checkSelfPermission(EditProfileActivity.this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(EditProfileActivity.this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE}, PICK_FROM_GALLERY);
} else {
Intent galleryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(galleryIntent, PICK_FROM_GALLERY);
}
} catch (Exception e) {
e.printStackTrace();
}
}
});
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String permissions[], @NonNull int[] grantResults)
{
switch (requestCode) {
case PICK_FROM_GALLERY:
// If request is cancelled, the result arrays are empty.
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
Intent galleryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(galleryIntent, PICK_FROM_GALLERY);
} else {
//do something like displaying a message that he didn`t allow the app to access gallery and you wont be able to let him select from gallery
}
break;
}
}
的应用数据,〜/ Kitematic“用于轻松访问批量数据”。