Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dockerfiles
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
schbrain-pub
dockerfiles
Commits
ca869b57
Commit
ca869b57
authored
Mar 27, 2020
by
liwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parents
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
0 deletions
+62
-0
common/Dockerfile
common/Dockerfile
+35
-0
common/run-app.sh
common/run-app.sh
+27
-0
No files found.
common/Dockerfile
0 → 100644
View file @
ca869b57
FROM
ajlx/edu-100-app-base:1.0.1-SNAPSHOT
ARG
JAR_FILE
RUN
echo
"JAR_FILE
${
JAR_FILE
}
"
COPY
${JAR_FILE} app.jar
ARG
SERVICE_NAME
RUN
echo
"SERVICE_NAME
${
SERVICE_NAME
}
"
ENV
SERVICE_NAME "${SERVICE_NAME}"
ARG
SPRING_PROFILE
RUN
echo
"SPRING_PROFILE
${
SPRING_PROFILE
}
"
ENV
SPRING_PROFILE "${SPRING_PROFILE}"
ARG
SERVICE_PORT
RUN
echo
"SERVICE_PORT
${
SERVICE_PORT
}
"
ENV
SERVICE_PORT "${SERVICE_PORT}"
EXPOSE
${SERVICE_PORT}
ARG
DUBBO_PORT
RUN
echo
"DUBBO_PORT
${
DUBBO_PORT
}
"
ENV
DUBBO_PORT "${DUBBO_PORT}"
EXPOSE
${DUBBO_PORT}
ARG
DEBUG_PORT
RUN
echo
"DEBUG_PORT
${
DEBUG_PORT
}
"
ENV
DEBUG_PORT "${DEBUG_PORT}"
EXPOSE
${DEBUG_PORT}
#copy run-app.sh
COPY
run-app.sh run-app.sh
RUN
chmod
+x run-app.sh
CMD
["/app/run-app.sh"]
\ No newline at end of file
common/run-app.sh
0 → 100755
View file @
ca869b57
#!/usr/bin/env bash
MEM_OPTS
=
"-Xms1024m -Xmx1024m"
if
[[
"
$SPRING_PROFILE
"
=
~
"online"
||
"
$SPRING_PROFILE
"
=
~
"pre"
]]
;
then
MEM_OPTS
=
"-Xms4096m -Xmx4096m"
fi
JAVA_OPTS
=
"-server
$MEM_OPTS
-Dspring.profiles.active=
$SPRING_PROFILE
-verbose.gc -Xloggc:gc.log
\
-XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime -XX:+HeapDumpOnOutOfMemoryError
\
-XX:+PrintGCApplicationConcurrentTime -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=100M
\
-DSW_AGENT_NAME=
$SERVICE_NAME
"
if
[[
"
$SPRING_PROFILE
"
=
~
"online"
||
"
$SPRING_PROFILE
"
=
~
"pre"
]]
;
then
SW_SERVICES
=
"10.2.2.7:11800,10.2.2.12:11800,10.2.2.13:11800"
else
SW_SERVICES
=
"192.168.0.6:11800"
JAVA_OPTS
=
"
$JAVA_OPTS
-javaagent:skywalking-agent/skywalking-agent.jar"
fi
JAVA_OPTS
=
"
$JAVA_OPTS
-DSW_AGENT_COLLECTOR_BACKEND_SERVICES=
$SW_SERVICES
"
if
[
$SPRING_PROFILE
!=
"online"
]
;
then
JAVA_OPTS
=
"
$JAVA_OPTS
-Xdebug -Xrunjdwp:transport=dt_socket,address=
$DEBUG_PORT
,server=y,suspend=n"
fi
java
$JAVA_OPTS
-Djava
.security.egd
=
file:/dev/./urandom
-jar
app.jar
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment