-
-
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.
Add Dockerfile and devcontainer configuration (#3)
- Loading branch information
Showing
6 changed files
with
79 additions
and
7 deletions.
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,23 @@ | ||
FROM mcr.microsoft.com/playwright:v1.33.0-focal | ||
|
||
ARG USERNAME=user | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
# Install necessary apps | ||
RUN apt-get update && apt-get install -y git fish sudo | ||
|
||
# Create the user | ||
RUN groupadd --gid ${USER_GID} ${USERNAME} \ | ||
&& useradd --uid ${USER_UID} --gid ${USER_GID} -m ${USERNAME} \ | ||
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/${USERNAME} \ | ||
&& chmod 0440 /etc/sudoers.d/${USERNAME} | ||
USER ${USERNAME} | ||
|
||
# Copy files | ||
WORKDIR /workspaces | ||
COPY --chown=${USER_UID}:${USER_GID} . . | ||
RUN npm install | ||
|
||
# Infinite development loop | ||
CMD ["/bin/bash", "-c", "while true; sleep 1000; done"] |
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,18 @@ | ||
{ | ||
"name": "Shlokas E2E", | ||
"dockerComposeFile": [ | ||
"docker-compose.yml" | ||
], | ||
"service": "e2e", | ||
"workspaceFolder": "/workspaces", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"TakumiI.markdowntable", | ||
"yzhang.markdown-all-in-one", | ||
"darkriszty.markdown-table-prettify", | ||
"ms-azuretools.vscode-docker" | ||
] | ||
} | ||
} | ||
} |
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,21 @@ | ||
name: shlokas | ||
version: '3' | ||
|
||
services: | ||
e2e: | ||
build: | ||
context: .. | ||
dockerfile: .devcontainer/Dockerfile | ||
args: | ||
- USER_UID=${UID:-1003} | ||
- USER_GID=${UID:-1003} | ||
expose: | ||
- 8080 | ||
networks: | ||
- shlokas | ||
volumes: | ||
- ..:/workspaces | ||
|
||
networks: | ||
shlokas: | ||
name: shlokas |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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