Skip to content

required key not available in docker container #128

@kzidane

Description

@kzidane

If I mount an encrypted folder into a docker container, it seems I can't write to that folder from within the container per the following:

$ fscrypt status /home/kzidane/
"/home/kzidane/" is encrypted with fscrypt.

Policy:   37064e515e94c9a0
Unlocked: Yes

Protected with 1 protector:
PROTECTOR         LINKED   DESCRIPTION
2fe3444e16452da0  Yes (/)  login protector for kzidane
$ docker run -it --rm -v/home/kzidane:/root/tmp ubuntu bash -c 'echo foo > /root/tmp/foo'
bash: /root/tmp/foo: Required key not available

Any way to fix this by chance?

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.10
Release:        18.10
Codename:       cosmic

$ fscrypt --version
fscrypt - A tool for managing Linux filesystem encryption

Version:
  v0.2.4-24-g8956903

Compiled:
  2019-03-05 11:13:16 -0500 EST

Author:
  Joe Richey <[email protected]>

Copyright:
  Copyright 2017 Google, Inc.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.


$ docker --version
Docker version 18.09.3, build 774a1f4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions