There are a couple ways I know of that you can do this. You can vendor or
copy as you mention. Another approach is to create a "build" image that
contains relevant credentials and a few `go env -w` directives to set up
your build environment, which you build separately and derive other
On Monday, January 14, 2019 at 4:52:37 PM UTC-8, Philip Nelson wrote:
>
> You can't copy from outside the context but you can volume mount it. In my
> docker-compose.yml I have the following for a golang:1.11-alpine image
> derivative:
>
> ```
> volumes:
> - ${GOPATH}:/go
> ```
>
>
You can't copy from outside the context but you can volume mount it. In my
docker-compose.yml I have the following for a golang:1.11-alpine image
derivative:
```
volumes:
- ${GOPATH}:/go
```
Phil
I `RUN go mod download` before copying my source
On Monday, January 14, 2019 at 8:49:05
Just as a data point, at my work we're using the `go mod vendor` / `go
build -mod=vendor` route for exactly the reasons you mention, and it works
quite well.
On Mon, Jan 14, 2019 at 8:49 AM wrote:
> On Saturday, January 12, 2019 at 5:57:19 PM UTC-8, Sam Whited wrote:
>>
>> On Fri, Jan 11, 2019,
On Saturday, January 12, 2019 at 5:57:19 PM UTC-8, Sam Whited wrote:
>
> On Fri, Jan 11, 2019, at 23:03, greg...@unity3d.com wrote:
> > But now, I don't know how I can essentially copy the mod cache (or
> > whatever the right term is) like I'd have copied the vendor directory.
>
> If you're
On Fri, Jan 11, 2019, at 23:03, grego...@unity3d.com wrote:
> But now, I don't know how I can essentially copy the mod cache (or
> whatever the right term is) like I'd have copied the vendor directory.
If you're suggesting that you already have the module cached on the machine
that builds your
Use the vendor directory, or use a replace directive with a relative path.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Hi,
I'm converting over a project from using dep to using mod and I think I
have a pretty good handle on it all... but:
This particular project has a dependency that is hosted on an internal git
server that requires credentials.
In the past it wasn't an issue because we'd just copy the vendor