Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5dd8add

Browse files
committed
add user and group in container for resolve permissions errors
1 parent e9141a3 commit 5dd8add

File tree

4 files changed

+54
-33
lines changed

4 files changed

+54
-33
lines changed

‎README.md‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,16 @@ $ docker-compose run --rm app composer install
1515
$ docker-compose up -d
1616
```
1717

18-
And go to [http://localhost](http://localhost)
18+
And go to [http://localhost:8001](http://localhost:8001)
19+
20+
# Some useful commands
21+
22+
Run composer command :
23+
```
24+
$ docker-compose exec app composer [options][command]
25+
```
26+
27+
Run symfony command :
28+
```
29+
$ docker-compose exec app bin/console [options][command]
30+
```

‎composer.lock‎

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docker-compose.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ version: '3'
22

33
services:
44
app:
5-
image: ke20/composer
5+
build:
6+
context: .
7+
dockerfile: ./docker/app/Dockerfile
68
volumes:
79
- '.:/app'
810
command: bin/console server:run --docroot=/app/public/ 0.0.0.0:8000
911
ports:
10-
- '80:8000'
12+
- '8001:8000'
1113
depends_on:
1214
- db
15+
user: app
1316

1417
db:
1518
image: mariadb:10.3

‎docker/app/Dockerfile‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM ke20/composer
2+
3+
RUN addgroup -S -g 1000 app && \
4+
adduser -S -u 1000 -g app app
5+
6+
USER app

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /