Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
JuniorJPDJ
funkwhale
Commits
14918ab1
Commit
14918ab1
authored
Sep 12, 2021
by
JuniorJPDJ
Browse files
Allow running docker container as non-root
parent
5b1c2f68
Pipeline
#16492
passed with stages
in 14 minutes and 55 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
api/Dockerfile
View file @
14918ab1
...
@@ -2,25 +2,24 @@ FROM alpine:3.13 as builder
...
@@ -2,25 +2,24 @@ FROM alpine:3.13 as builder
RUN
\
RUN
\
echo
'installing dependencies'
&&
\
echo
'installing dependencies'
&&
\
apk add
--no-cache
\
apk add
--no-cache
\
git
\
git
\
musl-dev
\
musl-dev
\
gcc
\
gcc
\
postgresql-dev
\
postgresql-dev
\
python3-dev
\
python3-dev
\
py3-psycopg2
\
py3-psycopg2
\
libldap
\
libldap
\
libffi-dev
\
libffi-dev
\
make
\
make
\
zlib-dev
\
zlib-dev
\
jpeg-dev
\
jpeg-dev
\
openldap-dev
\
openldap-dev
\
openssl-dev
\
openssl-dev
\
cargo
\
cargo
\
libxml2-dev
\
libxml2-dev
\
libxslt-dev
\
libxslt-dev
\
&&
\
&&
\
\
ln
-s
/usr/bin/python3 /usr/bin/python
ln
-s
/usr/bin/python3 /usr/bin/python
# create virtual env for next stage
# create virtual env for next stage
...
@@ -53,21 +52,21 @@ ENV PATH="/venv/bin:$PATH"
...
@@ -53,21 +52,21 @@ ENV PATH="/venv/bin:$PATH"
RUN
apk add
--no-cache
\
RUN
apk add
--no-cache
\
libmagic
\
libmagic
\
bash
\
bash
\
gettext
\
gettext
\
python3
\
python3
\
jpeg-dev
\
jpeg-dev
\
ffmpeg
\
ffmpeg
\
libpq
\
libpq
\
libxml2
\
libxml2
\
libxslt
\
libxslt
\
&&
\
&&
\
\
ln
-s
/usr/bin/python3 /usr/bin/python
ln
-s
/usr/bin/python3 /usr/bin/python
COPY
. /app
WORKDIR
/app
RUN
chmod
755 compose compose/django
ENTRYPOINT
["./compose/django/entrypoint.sh"]
ENTRYPOINT
["./compose/django/entrypoint.sh"]
CMD
["./compose/django/server.sh"]
CMD
["./compose/django/server.sh"]
COPY
. /app
WORKDIR
/app
api/compose/django/entrypoint.sh
View file @
14918ab1
...
@@ -19,8 +19,7 @@ if [ -z "$CELERY_BROKER_URL" ]; then
...
@@ -19,8 +19,7 @@ if [ -z "$CELERY_BROKER_URL" ]; then
fi
fi
# we copy the frontend files, if any so we can serve them from the outside
# we copy the frontend files, if any so we can serve them from the outside
if
[
-d
"frontend"
]
;
then
if
[
-d
"frontend"
]
&&
[
-d
"/frontend"
]
;
then
mkdir
-p
/frontend
cp
-r
frontend/
*
/frontend/
cp
-r
frontend/
*
/frontend/
export
FUNKWHALE_SPA_HTML_ROOT
=
/frontend/index.html
export
FUNKWHALE_SPA_HTML_ROOT
=
/frontend/index.html
fi
fi
...
...
changes/changelog.d/1334.enhancement
0 → 100644
View file @
14918ab1
Allow running multi-container setup on non-root user inside docker (!1375) (fixes #1334)
Write
Preview
Supports
Markdown
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