File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ #
2+ # Flow Agent Dockerfile
3+ # Image Name: flowci/flow-agent
4+ #
5+ # https://github.com/FlowCI/flow-platform
6+ #
7+ FROM flowci/flow-platform-base:latest
8+
9+ # setup flow.ci default environments
10+ ENV FLOW_PLATFORM_SOURCE_CODE=/flow-platform
11+ ENV MVN_CACHE=/root/.m2
12+ ENV FLOW_AGENT_DIR=$HOME/agent
13+
14+
15+ # copy code
16+ COPY . $FLOW_PLATFORM_SOURCE_CODE
17+
18+ # mvn build and set wars to tomcat and delete no use thing
19+ RUN cd $FLOW_PLATFORM_SOURCE_CODE \
20+ && rm -rf $FLOW_PLATFORM_SOURCE_CODE/dist \
21+ && mvn clean install -DskipTests=true \
22+ && mkdir -p $FLOW_PLATFORM_CONFIG_DIR \
23+ && cd $FLOW_PLATFORM_SOURCE_CODE \
24+ && mv ./dist/flow-agent-*.jar $FLOW_AGENT_DIR/flow-agent.jar \
25+ && rm -rf $FLOW_PLATFORM_SOURCE_CODE \
26+ && rm -rf $MVN_CACHE
27+
28+
29+ WORKDIR $FLOW_AGENT_DIR
30+
31+ CMD java -jar ./flow-agent.jar $FLOW_BASE_URL $FLOW_TOKEN
You can’t perform that action at this time.
0 commit comments