# Pushing a legacy app running on Tohora

**URL:** <https://forums.balena.io/t/pushing-a-legacy-app-running-on-tohora/346528>\
**Category:** Product support\
**Tags:** support, docker, raspberrypi4\
**Created:** [August 30, 2021, 11:48pm UTC](https://forums.balena.io/t/pushing-a-legacy-app-running-on-tohora/346528 "2021-08-30T23:48:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![richarde](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@richarde](https://forums.balena.io/u/richarde)\
**Post date:** [August 30, 2021, 11:48pm UTC](https://forums.balena.io/t/pushing-a-legacy-app-running-on-tohora/346528/1 "2021-08-30T23:48:24Z")

</div>

Hi,

I’ve inherited a legacy app that compiles Tohora from source at the start of the Dockerfile i.e.

```auto
# build tohora from source
FROM balenalib/raspberrypi3-golang as builder

RUN go get -d -v github.com/mozz100/tohora/...

WORKDIR /go/src/github.com/mozz100/tohora

RUN go build

```

When I try to use `balena push` to deploy the code to my test device I get the following error,

```auto
[main] Step 1/33 : FROM balenalib/raspberrypi3-golang as builder
[main] ---> 448bfdca5029
[main] Step 2/33 : RUN go get -d -v github.com/mozz100/tohora/...
[main] Using cache
[main] ---> a4654c443c8f
[main] Step 3/33 : WORKDIR /go/src/github.com/mozz100/tohora
[main] Using cache
[main] ---> 10c44ea6653f
[main] Step 4/33 : RUN go build
[main] ---> Running in 164be2f108cf
[main] go: go.mod file not found in current directory or any parent directory; see 'go help modules'
[main]
[main] Removing intermediate container 164be2f108cf
[main] The command '/bin/sh -c go build' returned a non-zero code: 1

```

This code was deployed to other production devices and is still running on them fine. I can also run the Docker build locally too with no problems and everything just builds. Can anyone suggest why the code won’t deploy here? Should I be using a different method such as `git push` or something?

---

<div class="post-metadata">

**Author:** ![richarde](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@richarde](https://forums.balena.io/u/richarde)\
**Post date:** [September 2, 2021, 12:25am UTC](https://forums.balena.io/t/pushing-a-legacy-app-running-on-tohora/346528/2 "2021-09-02T00:25:31Z")

</div>

If anyone needs to know how to fix the issue, it appears to have come about with a change of versions in `go` in the base image. Later versions of go fetch packages into the `pkg/mod` folder rather than the `src` folder. To go back to the old behaviour simply add `ENV GO111MODULE=off` before the `RUN go get` command
