-
Notifications
You must be signed in to change notification settings - Fork 5.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
[WIP] Init Dockerfile #16
Conversation
@@ -32,5 +35,6 @@ install: | |||
- go get -u github.com/jteeuwen/go-bindata/... | |||
- yarn | |||
script: | |||
- docker build . |
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.
once docker is building this we can remove before_install
and install
scripts and instead use the Docker image to run the test as it is documented here:
https://docs.travis-ci.com/user/build-stages/share-docker-image/
@ry
It requires publishing to Docker Hub which requires setting username/password for Docker Hub in the TravisCI configurations.
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.
That'd be great. You'll include v8worker2 and the compiled V8 in the image?
Are you able to test with travis in your own branch? That would be preferable. Once it's working I can publish it for ry/deno
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.
You'll include v8worker2 and the compiled V8 in the image?
That's the goal. I'll work towards that.
Right now I have a very poor internet connection which doesn't let me download large files so I can't test this locally. Tomorrow when I go back home I'll finish this up. I did "Allow edits from maintainers." in this PR so feel free to push to this branch if you want
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.
I recommend build the project docker image on vps and transfer images via scp to your development machine.
If you’d like to build the image on your development machine , you can use arg instruction and env vars to update source, or pull images via proxy.
At last, i recommend use docker-compose exec to excute some cmds instead of write some entrypoint script in dockerfile, better maintenance.
good luck.
github.com/golang/protobuf/protoc-gen-go \ | ||
github.com/jteeuwen/go-bindata | ||
|
||
RUN go get -d github.com/ry/v8worker2 |
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.
Needs something like:
RUN (cd $GOPATH/src/github.com/ry/v8worker2; ./build.py)
@@ -0,0 +1,22 @@ | |||
FROM golang:1.10.2-stretch | |||
|
|||
RUN apk add --update go |
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.
Here can minimize the number of layers, there are other place can be optimized, can refer to https://docs.docker.com/develop/develop-images/dockerfile_best-practices
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.
Development environment using the image is different production environment, proper use of the base image of the software is easier to configure, follow-up maintenance cost can reduce a lot, just a little sacrifice file size.
If you want to encapsulate a large and complete image, a fat docker image, maybe debian/ubuntu/centos
is a wise choice.
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.
@soulteary CentOS 7 is not an option right now, because deno (or some of third-party) now relies on GLIBC_2.18
, but CentOS 7 only support GLIBC_2.17
. It should be fixed in Centos 8.
Currently, deno uses Ubuntu 14.04 LTS (trusty) in travis which seems to be using GLIBC_2.19
.
Closing in favor of #63 |
My internet is too slow to pull all those images locally 😭 Trying in TravisCI :D