Skip to content
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

Closed
wants to merge 2 commits into from
Closed

[WIP] Init Dockerfile #16

wants to merge 2 commits into from

Conversation

mohsen1
Copy link
Contributor

@mohsen1 mohsen1 commented May 30, 2018

My internet is too slow to pull all those images locally 😭 Trying in TravisCI :D

@@ -32,5 +35,6 @@ install:
- go get -u github.com/jteeuwen/go-bindata/...
- yarn
script:
- docker build .
Copy link
Contributor Author

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.

Copy link
Member

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

Copy link
Contributor Author

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

Choose a reason for hiding this comment

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

@mohsen1

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
Copy link
Member

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
Copy link
Contributor

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

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.

Copy link
Contributor

@Maxim-Mazurok Maxim-Mazurok Feb 1, 2019

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.

@mohsen1
Copy link
Contributor Author

mohsen1 commented Jun 1, 2018

Closing in favor of #63

@mohsen1 mohsen1 closed this Jun 1, 2018
@maxmcd maxmcd mentioned this pull request Jun 1, 2018
piscisaureus pushed a commit to piscisaureus/deno that referenced this pull request Oct 7, 2019
bartlomieju added a commit that referenced this pull request Oct 25, 2022
hardfist pushed a commit to hardfist/deno that referenced this pull request Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants