Skip to content

Commit 29f7dd8

Browse files
committed
Update Dockerfile to fix permission error on poetry install (#100)
1 parent 3dbae47 commit 29f7dd8

File tree

4 files changed

+152
-139
lines changed

4 files changed

+152
-139
lines changed

Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,21 @@ RUN chown -R gen3:gen3 /${appname}
1212
# Builder stage
1313
FROM base AS builder
1414

15+
USER root
16+
1517
# copy ONLY poetry artifact, install the dependencies but not the app;
1618
# this will make sure that the dependencies are cached
1719
COPY poetry.lock pyproject.toml /${appname}/
1820
RUN poetry install -vv --no-root --only main --no-interaction
1921

20-
COPY --chown=gen3:gen3 . /${appname}
21-
22-
# install the app
22+
COPY . /${appname}
2323
RUN poetry install --without dev --no-interaction
2424

25+
# ensure the app dir + venv are owned by gen3 for runtime image
26+
RUN chown -R gen3:gen3 /${appname} /venv
27+
28+
USER gen3
29+
2530
# Final stage
2631
FROM base
2732

docs/openapi.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ components:
1111
type: object
1212
ValidationError:
1313
properties:
14+
ctx:
15+
title: Context
16+
type: object
17+
input:
18+
title: Input
1419
loc:
1520
items:
1621
anyOf:

gen3workflow/auth.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ async def get_token_claims(self) -> dict:
5959
)
6060

6161
try:
62-
token_claims = await access_token(
63-
"user", "openid", audience="openid", purpose="access"
64-
)(self.bearer_token)
62+
token_claims = await access_token("user", "openid", purpose="access")(
63+
self.bearer_token
64+
)
6565
except Exception as e:
6666
err_msg = "Could not verify, parse, and/or validate provided access token"
6767
logger.error(

0 commit comments

Comments
 (0)