Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
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
Maunium
synapse
Commits
8dfb33d3
Commit
8dfb33d3
authored
6 years ago
by
Jan Christian Grünhage
Browse files
Options
Downloads
Patches
Plain Diff
make python 3 work in the docker container
parent
23b53b4e
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
.dockerignore
+1
-0
1 addition, 0 deletions
.dockerignore
docker/Dockerfile
+3
-1
3 additions, 1 deletion
docker/Dockerfile
docker/start.py
+2
-1
2 additions, 1 deletion
docker/start.py
with
6 additions
and
2 deletions
.dockerignore
+
1
−
0
View file @
8dfb33d3
...
...
@@ -2,6 +2,7 @@ Dockerfile
.travis.yml
.gitignore
demo/etc
synctl
tox.ini
.git/*
.tox/*
This diff is collapsed.
Click to expand it.
docker/Dockerfile
+
3
−
1
View file @
8dfb33d3
FROM
docker.io/python:2-alpine3.8
ARG
PYTHON_VERSION=2
FROM
docker.io/python:${PYTHON_VERSION}-alpine3.8
COPY
. /synapse
...
...
@@ -12,6 +13,7 @@ RUN apk add --no-cache --virtual .build_deps \
postgresql-dev
\
zlib-dev
\
&&
cd
/synapse
\
&&
sed
-i
's/\["synctl"\] + //'
setup.py
\
&&
apk add
--no-cache
--virtual
.runtime_deps
\
libffi
\
libjpeg-turbo
\
...
...
This diff is collapsed.
Click to expand it.
docker/start.py
+
2
−
1
View file @
8dfb33d3
...
...
@@ -5,6 +5,7 @@ import os
import
sys
import
subprocess
import
glob
import
codecs
# Utility functions
convert
=
lambda
src
,
dst
,
environ
:
open
(
dst
,
"
w
"
).
write
(
jinja2
.
Template
(
open
(
src
).
read
()).
render
(
**
environ
))
...
...
@@ -23,7 +24,7 @@ def generate_secrets(environ, secrets):
with
open
(
filename
)
as
handle
:
value
=
handle
.
read
()
else
:
print
(
"
Generating a random secret for {}
"
.
format
(
name
))
value
=
os
.
urandom
(
32
).
encode
(
"
hex
"
)
value
=
codecs
.
encode
(
os
.
urandom
(
32
),
"
hex
"
).
decode
(
)
with
open
(
filename
,
"
w
"
)
as
handle
:
handle
.
write
(
value
)
environ
[
secret
]
=
value
...
...
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