Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FoD
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
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
David Schmitz
FoD
Commits
f674ac09
Commit
f674ac09
authored
4 years ago
by
David Schmitz
Committed by
Ihr Name
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fixed debian FoD container and also allow for 2step container building
parent
a0a17ca5
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile.debian.base
+24
-0
24 additions, 0 deletions
Dockerfile.debian.base
Dockerfile.debian.step2
+26
-0
26 additions, 0 deletions
Dockerfile.debian.step2
install-debian.sh
+68
-17
68 additions, 17 deletions
install-debian.sh
with
118 additions
and
17 deletions
Dockerfile.debian.base
0 → 100644
+
24
−
0
View file @
f674ac09
FROM debian:buster
ENV LC_ALL en_US.utf8
RUN apt-get update
RUN echo "Set up container's locales"
RUN echo -e 'LANG="en_US.UTF-8"\nLANGUAGE="en_US"\n' > /etc/default/locale
RUN echo "en_US.utf8 UTF-8" >> /etc/locale.gen
RUN apt-get -qqy install locales
RUN mkdir -p /var/log/fod /srv
#COPY . /srv/flowspy
COPY install-debian.sh requirements.txt /srv/flowspy/
RUN apt-get -qqy install patch
#RUN (cd /srv/flowspy; ./install-debian.sh;)
RUN (cd /srv/flowspy; ./install-debian.sh --basesw;)
#EXPOSE 8000
#CMD [ "/srv/flowspy/runfod.sh" ]
CMD [ "sleep" "10000000" ]
This diff is collapsed.
Click to expand it.
Dockerfile.debian.step2
0 → 100644
+
26
−
0
View file @
f674ac09
#FROM debian:buster
FROM fodpy3-debian_base
ENV LC_ALL en_US.utf8
RUN apt-get update
RUN echo "Set up container's locales"
RUN echo -e 'LANG="en_US.UTF-8"\nLANGUAGE="en_US"\n' > /etc/default/locale
RUN echo "en_US.utf8 UTF-8" >> /etc/locale.gen
RUN apt-get -qqy install locales
RUN mkdir -p /var/log/fod /srv
COPY . /srv/flowspy
RUN apt-get -qqy install patch
RUN (cd /srv/flowspy/flowspy && cp -f settings.py.dist settings.py && patch settings.py < settings.py.patch && touch settings_local.py;)
#RUN (cd /srv/flowspy; bash ./install-debian.sh;)
RUN (cd /srv/flowspy; ./install-debian.sh --fodproper;)
EXPOSE 8000
WORKDIR /srv/flowspy
CMD [ "/srv/flowspy/runfod.sh" ]
This diff is collapsed.
Click to expand it.
install-debian.sh
+
68
−
17
View file @
f674ac09
set
-e
echo
"Install dependencies"
apt-get
-qqy
update
apt-get
-qqy
install
python3-virtualenv python3-venv python3-setuptools
\
python3-dev vim git build-essential libevent-dev libxml2-dev libxslt1-dev
\
mariadb-server libmariadb-dev patch redis-server
echo
"Setup python environment for FoD"
mkdir
-p
/var/log/fod /srv
pyvenv /srv/venv
(
#!/bin/bash
#
# This script installs all dependencies for Firewall-on-Demand running in Python3
# with Celery, Redis, and sqlite.
#
install_basesw
=
1
install_fodproper
=
1
if
[
$#
-ge
1
-a
"
$1
"
=
"--both"
]
;
then
shift
1
install_basesw
=
1
install_fodproper
=
1
elif
[
$#
-ge
1
-a
"
$1
"
=
"--basesw"
]
;
then
shift
1
install_basesw
=
1
install_fodproper
=
0
elif
[
$#
-ge
1
-a
"
$1
"
=
"--fodproper"
]
;
then
shift
1
install_basesw
=
0
install_fodproper
=
1
fi
##
if
[
"
$install_basesw
"
=
1
]
;
then
set
-e
echo
"Install dependencies"
apt-get
-qqy
update
apt-get
-qqy
install
python3-virtualenv python3-venv python3-setuptools
\
python3-dev vim git build-essential libevent-dev libxml2-dev libxslt1-dev
\
mariadb-server libmariadb-dev patch redis-server
\
rustc libssl-dev
\
procps
set
+e
fi
if
[
"
$install_fodproper
"
=
0
]
;
then
echo
"Setup partial python environment for FoD"
mkdir
-p
/srv
pyvenv /srv/venv
source
/srv/venv/bin/activate
pip
install
wheel
pip
install
-r
requirements.txt
else
echo
"Setup python environment for FoD"
mkdir
-p
/var/log/fod /srv
pyvenv /srv/venv
(
set
+e
source
/srv/venv/bin/activate
mkdir
-p
/srv/flowspy/
# Select source dir and copy FoD into /srv/flowspy/
if
[
"
`
basename
"
$0
"
`
"
=
install-
debian
.sh
]
;
then
if
[
"
`
basename
"
$0
"
`
"
=
install-
centos
.sh
]
;
then
# this script is in the source directory
cp
-f
-r
"
`
dirname
$0
`
"
/
*
/srv/flowspy/
elif
[
-e
/vagrant
]
;
then
# vagrant's copy in /vagrant/
cp
-f
-r
/vagrant/
*
/srv/flowspy/
elif
[
-e
./install-
debian
.sh
]
;
then
elif
[
-e
./install-
centos
.sh
]
;
then
# current directory is with the sourcecode
cp
-f
-r
./
*
/srv/flowspy/
else
...
...
@@ -37,12 +81,19 @@ pyvenv /srv/venv
cp
-f
settings.py.dist settings.py
patch settings.py < settings.py.patch
)
pip
install
wheel
pip
install
-r
requirements.txt
touch
flowspy/settings_local.py
./manage.py collectstatic
#./manage.py syncdb --noinput
mkdir
-p
/srv/flowspy/static/
./manage.py collectstatic
--noinput
./manage.py migrate
./manage.py loaddata initial_data
)
)
set
+e
fi
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