Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-advanced-user-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
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
Code review analytics
Issue 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
caosdb
Software
caosdb-advanced-user-tools
Commits
c9bc5cb9
Commit
c9bc5cb9
authored
5 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
update
parent
174ca831
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.docker/Dockerfile
+9
-2
9 additions, 2 deletions
.docker/Dockerfile
.docker/cert.sh
+58
-0
58 additions, 0 deletions
.docker/cert.sh
with
67 additions
and
2 deletions
.docker/Dockerfile
+
9
−
2
View file @
c9bc5cb9
FROM
debian:latest
RUN
apt-get update
&&
\
apt-get
install
curl python3 python3-pip git python-autopep8
\
python3-pytest
-y
apt-get
install
\
curl
\
python3
\
python3-pip
\
git
\
openjdk-11-jdk-headless
\
python-autopep8
\
python3-pytest
\
-y
COPY
.docker/wait-for-it.sh /wait-for-it.sh
RUN
git clone https://gitlab.com/caosdb/caosdb-pylib.git
&&
\
cd
caosdb-pylib
&&
pip3
install
.
...
...
This diff is collapsed.
Click to expand it.
.docker/cert.sh
0 → 100755
+
58
−
0
View file @
c9bc5cb9
#!/bin/bash
# ** header v3.0
# This file is a part of the CaosDB Project.
#
# Copyright (C) 2019 Daniel Hornung, Göttingen
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# ** end header
# Creates a directory `cert` and certificates in this directory.
#
# The hostname for which the certificate is created can be changed by setting
# the environment variable CAOSHOSTNAME.
#
# ## Overview of variables ##
#
# - CAOSHOSTNAME :: Hostname for the key (localhost)
# - KEYPW :: Password for the key (default ist CaosDBSecret)
# - KEYSTOREPW :: Password for the key store (same as KEYPW)
function
cert
()
{
mkdir
-p
cert
cd
cert
KEYPW
=
"
${
KEYPW
:-
CaosDBSecret
}
"
CAOSHOSTNAME
=
"
${
CAOSHOSTNAME
:-
localhost
}
"
KEYSTOREPW
=
"
${
KEYPW
:-}
"
# NOTE: KEYPW and KEYSTOREPW are the same, due to Java limitations.
KEYPW
=
"
${
KEYPW
}
"
openssl genrsa
-aes256
-out
caosdb.key.pem
\
-passout
env
:KEYPW 2048
# Certificate is for localhost
KEYPW
=
"
${
KEYPW
}
"
openssl req
-new
-x509
-key
caosdb.key.pem
\
-out
caosdb.cert.pem
-passin
env
:KEYPW
\
-subj
"/C=/ST=/L=/O=/OU=/CN=
${
CAOSHOSTNAME
}
"
KEYPW
=
"
${
KEYPW
}
"
KEYSTOREPW
=
"
$KEYSTOREPW
"
openssl pkcs12
-export
\
-inkey
caosdb.key.pem
-in
caosdb.cert.pem
-out
all-certs.pkcs12
\
-passin
env
:KEYPW
-passout
env
:KEYPW
keytool
-importkeystore
-srckeystore
all-certs.pkcs12
-srcstoretype
PKCS12
\
-deststoretype
pkcs12
-destkeystore
caosdb.jks
\
-srcstorepass
"
${
KEYPW
}
"
\
-destkeypass
"
${
KEYPW
}
"
-deststorepass
"
$KEYSTOREPW
"
echo
"Certificates successfuly created."
}
cert
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