-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dockerization #24
Dockerization #24
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking a crack at this!
Once this PR has been merged, I'll update the credentials to push the image to docker hub and create a new release
Dockerfile
Outdated
@@ -0,0 +1,22 @@ | |||
|
|||
FROM golang:1.10-stretch as downloader |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use
FROM golang:1.10-alpine3.7 AS downloader
RUN apk add --no-cache git gcc musl-dev
That way you won't need glibc below. musl should be compatible with glibc
Dockerfile
Outdated
go get -u github.com/kshvakov/clickhouse && \ | ||
GOOS=linux GOARCH=386 go build -a -o build/migrate.linux-386 -ldflags='-X main.Version=$(VERSION)' -tags '$(DATABASE) $(SOURCE)' ./cli | ||
|
||
FROM frolvlad/alpine-glibc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use
FROM alpine:3.7
RUN apk add --no-cache ca-certificates
musl should work instead of glibc and I'd prefer to only depend on official docker images. Also, we'll need the certs for remote sources.
.travis.yml
Outdated
@@ -7,6 +7,8 @@ go: | |||
|
|||
env: | |||
- MIGRATE_TEST_CONTAINER_BOOT_TIMEOUT=60 | |||
- secure: "ENCYRYPTED USERNAME" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these environment variables for now since it's creating extra TravisCI builds. I'll figure out a way to safely pass in credentials once this PR is merged.
To add encrypted variable you should do this (cf https://docs.travis-ci.com/user/environment-variables/#Defining-encrypted-variables-in-.travis.yml)
With |
Signed-off-by: Alexandre MARRE <[email protected]>
Linked to #23
I don't use travis ci but according to the documentation you need to setup environments variable from cli then added hash to .travis.yml ?
Image currently weighs 13.8MB