# Dockerfile doesn't build go shard

**URL:** <https://forum.heroiclabs.com/t/dockerfile-doesnt-build-go-shard/1896>\
**Category:** Local Setup\
**Created:** [August 20, 2021, 12:49pm UTC](https://forum.heroiclabs.com/t/dockerfile-doesnt-build-go-shard/1896 "2021-08-20T12:49:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vazkss](https://avatars.discourse-cdn.com/v4/letter/v/3da27b/32.png) [@vazkss](https://forum.heroiclabs.com/u/vazkss)\
**Post date:** [August 20, 2021, 12:49pm UTC](https://forum.heroiclabs.com/t/dockerfile-doesnt-build-go-shard/1896/1 "2021-08-20T12:49:35Z")

</div>

Hello ,  
I’ve been following setup from heroiclabs and for local work everything went well. When I try to run through docker as I observed dockerfile doesn’t create necessary shard file for nakama to import go module.

Here is my Dockerfile

```auto
FROM heroiclabs/nakama-pluginbuilder:3.3.0 AS go-builder

ENV GO111MODULE on
ENV CGO_ENABLED 1

WORKDIR /app

COPY go.mod .
COPY main.go .
COPY vendor/ vendor/

RUN go build --trimpath --mod=vendor --buildmode=plugin -o ./modules/backend.so

FROM heroiclabs/nakama:3.3.0

COPY --from=go-builder ./modules/backend.so /nakama/data/modules/
COPY local.yml .

```

---

<div class="post-metadata">

**Author:** ![sean](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sean/32/643_2.png) [@sean](https://forum.heroiclabs.com/u/sean)\
**Post date:** [August 23, 2021, 9:38am UTC](https://forum.heroiclabs.com/t/dockerfile-doesnt-build-go-shard/1896/2 "2021-08-23T09:38:17Z")

</div>

Hi @vazkss welcome to the Heroic Labs and Nakama community. Do you mean “shared” file instead of “shard”?

Could you share the log files you get when running the above?

---

<div class="post-metadata">

**Author:** ![tom](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/tom/32/676_2.png) [@tom](https://forum.heroiclabs.com/u/tom)\
**Post date:** [August 23, 2021, 9:41am UTC](https://forum.heroiclabs.com/t/dockerfile-doesnt-build-go-shard/1896/3 "2021-08-23T09:41:24Z")

</div>

Hi @vazkss.

You have set the `WORKDIR` to `/app` so your copy command needs to look like this:

```auto
COPY --from=go-builder ./app/modules/backend.so /nakama/data/modules/

```

Hope this helps.
