Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Add Docker image #4

Merged
merged 3 commits into from
May 8, 2018
Merged

Add Docker image #4

merged 3 commits into from
May 8, 2018

Conversation

sgirones
Copy link
Contributor

@sgirones sgirones commented May 7, 2018

No description provided.

Dockerfile Outdated
@@ -0,0 +1,11 @@
FROM golang:1.10.1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.10.2 is out, might as well use that.

Dockerfile Outdated

FROM alpine:3.7
RUN apk add --no-cache ca-certificates
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is necessary. The only reason gotrue had it was because of a library that was using cgo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to do it because the binary was looking for that library. I guess it's related to not doing an static build

Dockerfile Outdated
FROM golang:1.10.1
WORKDIR /go/src/github.com/netlify/twickr
COPY . /go/src/github.com/netlify/twickr/
RUN go get && go build

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a static build, we need to add CGO_ENABLED=0. We should also setup glide to vendor the dependencies. I'm happy to do that if you want.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add the glide setup 👌

@sgirones sgirones merged commit 6f31283 into netlify:master May 8, 2018
@sgirones sgirones deleted the add-docker-image branch May 8, 2018 08:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants