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

Refactor Dockerfile #31

Merged
merged 1 commit into from
Jun 22, 2017
Merged

Refactor Dockerfile #31

merged 1 commit into from
Jun 22, 2017

Conversation

nitisht
Copy link
Contributor

@nitisht nitisht commented Jun 21, 2017

  • Moved all the build activities to Docker build phase. While this makes build slower, run is faster.
  • Add directories inside run/ for different modes.
  • Refactor Dockerfile to add build processes.
  • It is now possible to set versions of various SDKs as well

@nitisht
Copy link
Contributor Author

nitisht commented Jun 21, 2017

Currently the minio-go tests fail due to minio/minio-go#718


# Minimum required versions for various languages
_init() {
GO_VERSION="1.7.4"
Copy link
Member

Choose a reason for hiding this comment

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

1.7.5

apt-get install -yq python3-pip

pip3 install --user -r ${minio_py_sdk_path}requirements.txt && \
pip3 install minio==$minio_py_sdk_version
Copy link
Member

Choose a reason for hiding this comment

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

Tabbing..

}

pyMain() {
installMinioPyDeps
Copy link
Contributor

Choose a reason for hiding this comment

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

chain commands with && so that it exits on first failure

# Compile test files
buildMinioJSTests() {
npm --prefix $minio_js_sdk_path install --save minio@$minio_js_sdk_version
npm --prefix $minio_js_sdk_path install
Copy link
Contributor

Choose a reason for hiding this comment

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

indentation off here. Also chain commands with && \

javaMain() {
installMinioJavaDeps
buildMinioJavaTests
cleanMinioJavaDeps
Copy link
Contributor

Choose a reason for hiding this comment

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

chain commands with && again - same feedback for the other build scripts as well.

@nitisht
Copy link
Contributor Author

nitisht commented Jun 21, 2017

addressed review comments.

MC_VERSION="RELEASE.2017-06-15T03-38-43Z"
MC_TEST_PATH="/mint/run/core/mc"

MINIO_JS_SDK_PATH="/mint/run/core/minio-js/"
Copy link
Member

Choose a reason for hiding this comment

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

You should either use "/" at the end of all paths or no "/" at the end. It is better to have no "/" so that when using it you can always use

${test_path}/minio.test

Currently the code is like this

${test_path}minio.test

In this form it is expected that test_path has a "/" otherwise it will cause lot more trouble. We should fix this consistently everywhere to avoid future bugs.

Copy link
Contributor

@poornas poornas left a comment

Choose a reason for hiding this comment

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

Dockerfile does not build because git dependency is missing.

@poornas
Copy link
Contributor

poornas commented Jun 21, 2017

Readme.md needs update for dockerfile vs dockerfile.dev

…kes build slower, run is faster.

- Add directories inside run/ for different modes.
- Refactor Dockerfile to add build processes.
@nitisht
Copy link
Contributor Author

nitisht commented Jun 22, 2017

Fixed review comments.

@nitisht nitisht merged commit f57b22a into minio:master Jun 22, 2017
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.

3 participants