Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
0c03ffeb
Commit
0c03ffeb
authored
Dec 12, 2019
by
Alexander Lercher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build script from new location
parent
f9f8a557
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
16 deletions
+19
-16
build.py
bin/build.py
+16
-13
Dockerfile
src/data-hub/semantic-linking-microservice/Dockerfile
+1
-1
Dockerfile
src/rest-gateway/Dockerfile
+1
-1
Dockerfile
...ransaction-hub-in/trace-retrieval-microservice/Dockerfile
+1
-1
No files found.
bin/build.py
View file @
0c03ffeb
import
os
import
os
import
shutil
import
shutil
import
sys
DOCKER_COMPOSE_NAME
=
"Dockerfile"
DOCKER_COMPOSE_NAME
=
"Dockerfile"
PATH
=
'../src/'
ROOT
=
'../'
SOURCEPATH
=
f
'{ROOT}src/'
paths
=
[]
paths
=
[]
for
r
,
_
,
f
in
os
.
walk
(
PATH
):
for
r
,
_
,
f
in
os
.
walk
(
SOURCE
PATH
):
for
filename
in
f
:
for
filename
in
f
:
if
DOCKER_COMPOSE_NAME
==
filename
:
if
DOCKER_COMPOSE_NAME
==
filename
:
paths
.
append
(
os
.
path
.
normpath
(
r
))
paths
.
append
(
os
.
path
.
normpath
(
r
))
command_args
=
[{
'path'
:
path
,
command_args
=
[{
'path'
:
path
,
'name'
:
str
(
path
)
.
split
(
os
.
path
.
normpath
(
'/'
))[
-
1
]}
'name'
:
str
(
path
)
.
split
(
os
.
path
.
normpath
(
'/'
))[
-
1
]}
for
path
for
path
in
paths
]
in
paths
]
res_str
=
[]
res_str
=
[]
for
command_arg
in
command_args
:
for
command_arg
in
command_args
:
path
=
command_arg
[
'path'
]
path
=
command_arg
[
'path'
]
image_name
=
f
"{command_arg['name']}"
image_name
=
command_arg
[
'name'
]
# copy Dockerfile into root dir to have access to modules folder
# copy Dockerfile into root dir to have access to modules folder
shutil
.
copy2
(
os
.
path
.
join
(
path
,
DOCKER_COMPOSE_NAME
),
'./'
)
shutil
.
copy2
(
os
.
path
.
join
(
path
,
DOCKER_COMPOSE_NAME
),
ROOT
)
# build then remove Dockerfile
# build then remove Dockerfile
exit_val
=
os
.
system
(
f
"docker image build -t {image_name}
.
"
)
exit_val
=
os
.
system
(
f
"docker image build -t {image_name}
{ROOT}
"
)
os
.
remove
(
DOCKER_COMPOSE_NAME
)
os
.
remove
(
os
.
path
.
normpath
(
ROOT
,
DOCKER_COMPOSE_NAME
)
)
res_str
.
append
(
f
"### {image_name} built with exit code {exit_val}"
)
res_str
.
append
(
f
"### {image_name} built with exit code {exit_val}"
)
# os.system(f"docker push {image_name}")
# os.system(f"docker push {image_name}")
print
(
f
"Found {len(command_args)} images"
)
print
(
f
"Found {len(command_args)} images"
)
for
s
in
res_str
:
for
s
in
res_str
:
print
(
s
)
print
(
s
)
\ No newline at end of file
src/data-hub/semantic-linking-microservice/Dockerfile
View file @
0c03ffeb
...
@@ -13,7 +13,7 @@ EXPOSE 5000
...
@@ -13,7 +13,7 @@ EXPOSE 5000
WORKDIR
/app
WORKDIR
/app
COPY
src/data-hub/semantic-linking-microservice/app/ /app/
COPY
src/data-hub/semantic-linking-microservice/app/ /app/
COPY
modules/ /app/
COPY
src/
modules/ /app/
RUN
chmod
a+x main.py
RUN
chmod
a+x main.py
CMD
["python", "./main.py"]
CMD
["python", "./main.py"]
\ No newline at end of file
src/rest-gateway/Dockerfile
View file @
0c03ffeb
...
@@ -14,7 +14,7 @@ EXPOSE 5000
...
@@ -14,7 +14,7 @@ EXPOSE 5000
WORKDIR
/app
WORKDIR
/app
COPY
src/rest-gateway/app/ /app/
COPY
src/rest-gateway/app/ /app/
COPY
modules/ /app/
COPY
src/
modules/ /app/
RUN
chmod
a+x main.py
RUN
chmod
a+x main.py
CMD
["python", "./main.py"]
CMD
["python", "./main.py"]
\ No newline at end of file
src/transaction-hub-in/trace-retrieval-microservice/Dockerfile
View file @
0c03ffeb
...
@@ -15,7 +15,7 @@ EXPOSE 5000
...
@@ -15,7 +15,7 @@ EXPOSE 5000
WORKDIR
/app
WORKDIR
/app
COPY
src/transaction-hub-in/trace-retrieval-microservice/app/ /app/
COPY
src/transaction-hub-in/trace-retrieval-microservice/app/ /app/
COPY
modules/ /app/
COPY
src/
modules/ /app/
RUN
chmod
a+x main.py
RUN
chmod
a+x main.py
CMD
["python", "./main.py"]
CMD
["python", "./main.py"]
\ No newline at end of file
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