Skip to content

Commit

Permalink
Merge pull request #23 from yuuki/generate_drootenv_by_root_user
Browse files Browse the repository at this point in the history
Fix permission denied error
  • Loading branch information
yuuki authored Jul 19, 2017
2 parents cab3de3 + 5f0877c commit e50f527
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func (c *Client) ExportImage(imageID string) (io.ReadCloser, error) {
cmd := fmt.Sprintf("echo \"%s\" > %s", strings.Join(image.ContainerConfig.Env, "\n"), environ.DROOT_ENV_FILE_PATH)
container, err := c.docker.ContainerCreate(ctx, &container.Config{
Image: imageID,
User: "root", // Avoid permission denied error
Entrypoint: []string{""}, // Clear the exising entrypoint
Cmd: []string{"/bin/sh", "-c", cmd},
}, nil, nil, "")
Expand Down

0 comments on commit e50f527

Please sign in to comment.