# Unable to write files from within a docker container

**URL:** <https://discuss.bitrise.io/t/unable-to-write-files-from-within-a-docker-container/10657>\
**Category:** Builds\
**Tags:** docker\
**Created:** [October 18, 2019, 3:00pm UTC](https://discuss.bitrise.io/t/unable-to-write-files-from-within-a-docker-container/10657 "2019-10-18T15:00:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![josepts](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@josepts](https://discuss.bitrise.io/u/josepts)\
**Post date:** [October 18, 2019, 3:00pm UTC](https://discuss.bitrise.io/t/unable-to-write-files-from-within-a-docker-container/10657/1 "2019-10-18T15:00:10Z")

</div>

# Bitrise Build Issue Report template

## Description of the issue

I have a build in which I need to run a proprietary Windows executable to generate the final build.

Currently I am able to run this step locally inside a Docker using wine.

However, when I attempt to run the same docker and script in a Bitrise build, the build fails as it is unable to write a file in the mounted volume I add.

## Environment:

**Where did the issue happen?**

Stack:  
Android & Docker, on Ubuntu 16.04.  
Docker with pre-cached Android setup, installed on Ubuntu 16.04.

Dockerfile:  
FROM scottyhardy/docker-wine:latest

```
RUN apt-get update && apt-get install -y zip

WORKDIR /usr/src/app

CMD ["touch test"]

```

Docker image created as:

```
docker run \
  --name test \
  -v "$(pwd)"/app:/usr/src/app/ \
  generate-cap:1.0

```

## Reproducibility

- \_Does a “Rebuild” help? No
- \_Does a rebuild without caches help? No
- _Does the issue happen sporadically, or every time?_ : every time
- _Does upgrading the build Step to the latest version help?_ : no
- _When did the issue start?_ : as soon as I set it up

### Local reproduction

Locally it succeeds.

### Local reproduction: Linux / Android (docker based) stack builds

Locally it succeeds.

## Build log

> **[Log in - Bitrise](https://app.bitrise.io/users/sign_in)**
>
> Bringing back the joy of iOS & Android development through automating build, testing and support cycles.

Example output:

```
+ echo 'Testing write permissions:'
+ mkdir pdr
mkdir: cannot create directory 'pdr': Permission denied

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)\
**Post date:** [November 17, 2019, 3:00pm UTC](https://discuss.bitrise.io/t/unable-to-write-files-from-within-a-docker-container/10657/2 "2019-11-17T15:00:16Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
