-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated devcontainer to use a non-root user
- In order not to create unwanted privileged files, devcontainer image was updated with a non-root user;
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Use cirrusci flutter image as base | ||
FROM cirrusci/flutter:stable | ||
|
||
ENV USER="dev" | ||
|
||
# Create user with proper privileges and give it access to required folders for flutter to work | ||
RUN useradd -ms /bin/bash $USER | ||
RUN chown -R $USER /sdks | ||
RUN chown -R $USER /root | ||
|
||
# Use newly created user | ||
USER $USER | ||
WORKDIR /home/$USER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
{ | ||
"name": "WingScore", | ||
"image": "cirrusci/flutter:stable", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"context": ".." | ||
}, | ||
"postCreateCommand": "flutter pub get", | ||
"extensions": ["dart-code.dart-code", "dart-code.flutter"] | ||
} |