Skip to content

Refactor dockerfile#1978

Merged
khadgarmage merged 12 commits intoapache:devfrom
liwenhe1993:dev
Feb 20, 2020
Merged

Refactor dockerfile#1978
khadgarmage merged 12 commits intoapache:devfrom
liwenhe1993:dev

Conversation

@liwenhe1993
Copy link
Copy Markdown
Member

Refactor dockerfile, and its size is about 600MB.

Please read README.md.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 19, 2020

Codecov Report

Merging #1978 into dev will increase coverage by 0.53%.
The diff coverage is 57.14%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev    #1978      +/-   ##
============================================
+ Coverage     30.28%   30.82%   +0.53%     
- Complexity     1367     1381      +14     
============================================
  Files           294      294              
  Lines         14999    15022      +23     
  Branches       1806     1810       +4     
============================================
+ Hits           4543     4631      +88     
+ Misses        10006     9931      -75     
- Partials        450      460      +10
Impacted Files Coverage Δ Complexity Δ
...heduler/api/controller/TaskInstanceController.java 22.22% <0%> (ø) 2 <0> (ø) ⬇️
...ache/dolphinscheduler/dao/entity/TaskInstance.java 0.87% <0%> (-0.05%) 1 <0> (ø)
...e/dolphinscheduler/dao/entity/ProcessInstance.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...uler/api/controller/ProcessInstanceController.java 2.43% <0%> (ø) 2 <0> (ø) ⬇️
...phinscheduler/api/service/TaskInstanceService.java 83.33% <100%> (+78.2%) 6 <0> (+4) ⬆️
...che/dolphinscheduler/api/service/UsersService.java 74.27% <100%> (+0.92%) 64 <3> (+4) ⬆️
...nscheduler/api/service/ProcessInstanceService.java 15.03% <85.71%> (+14.4%) 8 <0> (+6) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c6f9306...a1357fb. Read the comment docs.

@@ -1,136 +1,74 @@
#
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why delete license announcement?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I have forgot it, because this dockerfile is new.

ARG version
ARG tar_version
#1. using aliyun mirror, and install dos2unix shadow bash openrc python sudo vim wget iputils net-tools ssh pip kazoo
RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories && \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can Alibaba Cloud Mirror make download quickly abroad?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I will remove it

chmod +x /opt/dolphinscheduler/script/*.sh && \
chmod +x /opt/dolphinscheduler/bin/*.sh && \
chmod +x /opt/zookeeper/bin/*.sh && \
dos2unix /root/startup-init-conf.sh && \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why dos2unix, not sh?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Because bash script with Windows line-ending CRLF won't work on Linux.

UNIX and UNIX-like operating systems (including Mac OS X) represent line endings as LF alone.

Converting line-ending using dos2unix.

mvn clean compile package -Prelease

# mv dolphinscheduler-bin.tar.gz file to dockerfile directory
echo -e "mv $(pwd)/dolphinscheduler-dist/target/apache-dolphinscheduler-incubating-${VERSION}-SNAPSHOT-dolphinscheduler-bin.tar.gz $(pwd)/dockerfile/\n"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is better to build image based on the current branch code, both CI and release can be used, rather than build based on the package

Copy link
Copy Markdown
Member Author

@liwenhe1993 liwenhe1993 Feb 20, 2020

Choose a reason for hiding this comment

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

User can use it, and CI can also use it.

@davidzollo
Copy link
Copy Markdown
Contributor

find some conflicting files

…duler into dev

# Conflicts:
#	dockerfile/conf/dolphinscheduler/conf/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml
#	dockerfile/conf/dolphinscheduler/conf/org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapper.xml
@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@khadgarmage khadgarmage merged commit 34e0a66 into apache:dev Feb 20, 2020
lenboo pushed a commit to lenboo/dolphinscheduler that referenced this pull request Feb 21, 2020
* Support DS to create user and group in windows environment

* Add unit test

* delete combined-server config in dolphinscheduler-daemon.sh file

* refactor dockerfile

* modify dockerfile

* modify dockerfile
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.

4 participants