Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SWP_2019_Sancus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leo1995
SWP_2019_Sancus
Commits
94a86ce8
Commit
94a86ce8
authored
4 years ago
by
leo1995
Browse files
Options
Downloads
Patches
Plain Diff
created 3 different sancus dockerfiles
parent
f9117593
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
docker/Makefile
+37
-11
37 additions, 11 deletions
docker/Makefile
docker/Node1/Dockerfile
+0
-0
0 additions, 0 deletions
docker/Node1/Dockerfile
docker/Node2/Dockerfile
+38
-0
38 additions, 0 deletions
docker/Node2/Dockerfile
docker/SWP/Dockerfile
+38
-0
38 additions, 0 deletions
docker/SWP/Dockerfile
with
113 additions
and
11 deletions
docker/Makefile
+
37
−
11
View file @
94a86ce8
-include
./Makefile.config
DOCKERFILE
=
Dockerfile
SANCUS_DOCKER
=
sancus-devel
CONTAINER
=
sancus_cc
FILES
=
$(
realpath
../src
)
DOCKERFILE_NODE1
=
Node1/Dockerfile
DOCKERFILE_NODE2
=
Node2/Dockerfile
DOCKERFILE_SWP
=
SWP/Dockerfile
SANCUS_DOCKER_NODE1
=
sancus-devel-node1
SANCUS_DOCKER_NODE2
=
sancus-devel-node2
SANCUS_DOCKER_SWP
=
sancus-devel-swp
CONTAINER_NODE1
=
sancus_cc_node1
CONTAINER_NODE2
=
sancus_cc_node2
CONTAINER_SWP
=
sancus_cc_SWP
FILES
=
$(
realpath
../../src
)
all
:
build run
build
:
docker build
-t
$(
SANCUS_DOCKER
)
--build-arg
SANCUS_SECURITY
=
$(
SANCUS_SECURITY
)
--build-arg
SANCUS_KEY
=
$(
SANCUS_KEY
)
-f
$(
DOCKERFILE
)
.
docker build
-t
$(
SANCUS_DOCKER_NODE1
)
--build-arg
SANCUS_SECURITY
=
$(
SANCUS_SECURITY
)
--build-arg
SANCUS_KEY
=
$(
SANCUS_KEY
)
-f
$(
DOCKERFILE_NODE1
)
.
docker build
-t
$(
SANCUS_DOCKER_NODE2
)
--build-arg
SANCUS_SECURITY
=
$(
SANCUS_SECURITY
)
--build-arg
SANCUS_KEY
=
$(
SANCUS_KEY
)
-f
$(
DOCKERFILE_NODE2
)
.
docker build
-t
$(
SANCUS_DOCKER_SWP
)
--build-arg
SANCUS_SECURITY
=
$(
SANCUS_SECURITY
)
--build-arg
SANCUS_KEY
=
$(
SANCUS_KEY
)
-f
$(
DOCKERFILE_SWP
)
.
container
:
docker run
-i
-p
80:80
-t
-v
'
$(
FILES
)
:/src'
-w
/src
--name
$(
CONTAINER
)
$(
SANCUS_DOCKER
)
/bin/bash
docker run
-d
--network
=
"host"
-v
'
$(
FILES
)
:/src'
-w
/src
--name
$(
CONTAINER_NODE1
)
$(
SANCUS_DOCKER_NODE1
)
#/bin/bash
docker run
-d
--network
=
"host"
-v
'
$(
FILES
)
:/src'
-w
/src
--name
$(
CONTAINER_NODE2
)
$(
SANCUS_DOCKER_NODE2
)
#/bin/bash
docker run
-d
--network
=
"host"
-v
'
$(
FILES
)
:/src'
-w
/src
--name
$(
CONTAINER_SWP
)
$(
SANCUS_DOCKER_SWP
)
#/bin/bash
run
:
@
echo
"Starting container
$(
CONTAINER
)
"
...
...
@@ -23,13 +33,29 @@ run:
clean
:
@
echo
"Cleaning up"
@
echo
-e
"[*] removing container '
$(
CONTAINER
)
'"
@
docker stop
$(
CONTAINER
)
2>/dev/null
||
true
@
docker container
rm
$(
CONTAINER
)
2>/dev/null
||
true
@
echo
-e
"[*] removing container '
$(
CONTAINER_NODE1
)
'"
@
docker stop
$(
CONTAINER_NODE1
)
2>/dev/null
||
true
@
docker container
rm
$(
CONTAINER_NODE1
)
2>/dev/null
||
true
@
echo
"Done."
@
echo
-e
"[*] removing container '
$(
CONTAINER_NODE2
)
'"
@
docker stop
$(
CONTAINER_NODE2
)
2>/dev/null
||
true
@
docker container
rm
$(
CONTAINER_NODE2
)
2>/dev/null
||
true
@
echo
"Done."
@
echo
-e
"[*] removing container '
$(
CONTAINER_SWP
)
'"
@
docker stop
$(
CONTAINER_SWP
)
2>/dev/null
||
true
@
docker container
rm
$(
CONTAINER_SWP
)
2>/dev/null
||
true
@
echo
"Done."
clean-image
:
@
echo
"Cleaning up:"
@
echo
-e
"[*] removing image '
$(
SANCUS_DOCKER
)
'"
@
docker image
rm
$(
SANCUS_DOCKER
)
2>/dev/null
||
true
@
echo
-e
"[*] removing image '
$(
SANCUS_DOCKER_NODE1
)
'"
@
docker image
rm
$(
SANCUS_DOCKER_NODE1
)
2>/dev/null
||
true
@
echo
"Done."
@
echo
"Cleaning up:"
@
echo
-e
"[*] removing image '
$(
SANCUS_DOCKER_NODE1
)
'"
@
docker image
rm
$(
SANCUS_DOCKER_NODE2
)
2>/dev/null
||
true
@
echo
"Done."
@
echo
"Cleaning up:"
@
echo
-e
"[*] removing image '
$(
SANCUS_DOCKER_NODE1
)
'"
@
docker image
rm
$(
SANCUS_DOCKER_SWP
)
2>/dev/null
||
true
@
echo
"Done."
This diff is collapsed.
Click to expand it.
docker/Dockerfile
→
docker/
Node1/
Dockerfile
+
0
−
0
View file @
94a86ce8
File moved
This diff is collapsed.
Click to expand it.
docker/Node2/Dockerfile
0 → 100644
+
38
−
0
View file @
94a86ce8
# Clean Ubuntu 18.04 container
FROM
ubuntu:18.04
RUN
apt-get update
-yqq
RUN
apt-get
-yqq
install
build-essential git lsb-release sloccount
sudo
vim xxd
# Non-interactive
RUN
echo
"Europe/Brussels"
>
/etc/timezone
RUN
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-yqq
tzdata
# Config parameters
ARG
SANCUS_SECURITY=64
ARG
SANCUS_KEY=deadbeefcafebabe
WORKDIR
sancus
# Build and install latest Sancus toolchain
RUN
git clone https://github.com/sancus-pma/sancus-main.git .
RUN
rm
Makefile
COPY
new_Makefile Makefile
RUN
echo
"UBUNTU := 1"
>>
Makefile.config
RUN
make
install
clean
\
SANCUS_SECURITY
=
$SANCUS_SECURITY
SANCUS_KEY
=
$SANCUS_KEY
# Install Webserver
RUN pip3 install flask
# Display a welcome message for interactive sessions
RUN
echo
'[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd'
\
>>
/etc/bash.bashrc
;
echo
"
\
========================================================================
\n\
= Sancus development Docker container =
\n\
========================================================================
\n\
`
lsb_release
-d
`
\n\n\
To get started, see <https://distrinet.cs.kuleuven.be/software/sancus/>,
\n\
or have a look at the example programs under </sancus/sancus-examples/>.
\n\
\n
"
\
>
/etc/motd
CMD
/bin/bash
This diff is collapsed.
Click to expand it.
docker/SWP/Dockerfile
0 → 100644
+
38
−
0
View file @
94a86ce8
# Clean Ubuntu 18.04 container
FROM
ubuntu:18.04
RUN
apt-get update
-yqq
RUN
apt-get
-yqq
install
build-essential git lsb-release sloccount
sudo
vim xxd
# Non-interactive
RUN
echo
"Europe/Brussels"
>
/etc/timezone
RUN
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-yqq
tzdata
# Config parameters
ARG
SANCUS_SECURITY=64
ARG
SANCUS_KEY=deadbeefcafebabe
WORKDIR
sancus
# Build and install latest Sancus toolchain
RUN
git clone https://github.com/sancus-pma/sancus-main.git .
RUN
rm
Makefile
COPY
new_Makefile Makefile
RUN
echo
"UBUNTU := 1"
>>
Makefile.config
RUN
make
install
clean
\
SANCUS_SECURITY
=
$SANCUS_SECURITY
SANCUS_KEY
=
$SANCUS_KEY
# Install Webserver
RUN pip3 install flask
# Display a welcome message for interactive sessions
RUN
echo
'[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd'
\
>>
/etc/bash.bashrc
;
echo
"
\
========================================================================
\n\
= Sancus development Docker container =
\n\
========================================================================
\n\
`
lsb_release
-d
`
\n\n\
To get started, see <https://distrinet.cs.kuleuven.be/software/sancus/>,
\n\
or have a look at the example programs under </sancus/sancus-examples/>.
\n\
\n
"
\
>
/etc/motd
CMD
/bin/bash
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment