forked from trustification/trustify-ui
-
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.
- Loading branch information
1 parent
e3e020b
commit c67ea76
Showing
6 changed files
with
52 additions
and
48 deletions.
There are no files selected for viewing
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,23 @@ | ||
FROM mcr.microsoft.com/devcontainers/base:ubuntu | ||
FROM quay.io/fedora/fedora:41 | ||
|
||
RUN dnf -y update && \ | ||
yum install -y git && \ | ||
git config --global --add safe.directory /workspace && \ | ||
rm -rf /var/cache /var/log/dnf* /var/log/yum.* | ||
COPY entrypoint.sh /entrypoint.sh | ||
RUN useradd -u 1000 vscode && echo vscode:10000:5000 > /etc/subuid && echo vscode:10000:5000 > /etc/subgid | ||
|
||
# set permissions | ||
RUN chown vscode:vscode -R /home/vscode | ||
|
||
RUN usermod -aG wheel vscode && \ | ||
# Allow user to execute 'sudo' without password | ||
echo "%wheel ALL=(ALL) NOPASSWD:ALL" | tee -a /etc/sudoers > /dev/null && \ | ||
# https://github.com/containers/podman/issues/2788#issuecomment-479923274 | ||
chmod 4755 /usr/bin/newgidmap && chmod 4755 /usr/bin/newuidmap | ||
|
||
ENV _CONTAINERS_USERNS_CONFIGURED="" | ||
|
||
ENTRYPOINT [ "/entrypoint.sh" ] | ||
USER vscode | ||
CMD ["tail", "-f", "/dev/null"] |
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,27 +1,13 @@ | ||
{ | ||
"name": "trustify-ui", | ||
"dockerComposeFile": "docker-compose.yml", | ||
"service": "frontend", | ||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", | ||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
"features": { | ||
"ghcr.io/devcontainers/features/docker-in-docker:2": {}, | ||
"ghcr.io/devcontainers/features/node:1": { | ||
"version": "20" | ||
} | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [ | ||
3000 | ||
], | ||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "bash .devcontainer/postCreateCommand.sh", | ||
// Configure tool-specific properties. | ||
"customizations": { | ||
"jetbrains": { | ||
"backend": "WebStorm" | ||
} | ||
}, | ||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
"remoteUser": "root" | ||
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind", | ||
"workspaceFolder": "/workspace", | ||
"containerUser" : "vscode", | ||
"runArgs": [ | ||
"--privileged", | ||
"--userns=keep-id" | ||
] | ||
} |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
|
||
# Ensure $HOME exists when starting | ||
if [ ! -d "${HOME}" ]; then | ||
mkdir -p "${HOME}" | ||
fi | ||
|
||
# Setup $PS1 for a consistent and reasonable prompt | ||
if [ -w "${HOME}" ] && [ ! -f "${HOME}"/.bashrc ]; then | ||
echo "PS1='\s-\v \w \$ '" > "${HOME}"/.bashrc | ||
fi | ||
|
||
# Add current (arbitrary) user to /etc/passwd and /etc/group | ||
if ! whoami > /dev/null 2>&1; then | ||
if [ -w /etc/passwd ]; then | ||
echo "update passwd file" | ||
echo "${USER_NAME:-user}:x:$(id -u):0:${USER_NAME:-user} user:${HOME}:/bin/bash" >> /etc/passwd | ||
echo "${USER_NAME:-user}:x:$(id -u):" >> /etc/group | ||
fi | ||
fi |
This file was deleted.
Oops, something went wrong.