Skip to content

Commit 955143b

Browse files
committed
fix(codespaces): reverted the user id changes as they were interfering with Playwright
1 parent 247cfe0 commit 955143b

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

.devcontainer/Dockerfile

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ FROM mcr.microsoft.com/playwright:v1.56.1-noble
33
ARG DEBIAN_FRONTEND=noninteractive
44
ARG TZ=UTC
55

6-
# Add user args (defaults can be overridden via devcontainer.json build.args)
7-
ARG USERNAME=serenity-js
8-
ARG USER_UID=1000
9-
ARG USER_GID=1000
10-
116
ENV SHELL=/bin/bash
127
ENV PATH="/opt/google/chrome:${PATH}"
138
ENV HOME=/home/${USERNAME}
@@ -34,22 +29,7 @@ RUN \
3429
apt-get clean && \
3530
rm -rf /var/lib/apt/lists/*
3631

37-
# Create a non-root user to run the workspace (more secure than using root)
38-
RUN set -eux; \
39-
# create group (if it doesn't already exist) and user with specified uid/gid
40-
if ! getent group ${USER_GID} >/dev/null 2>&1; then \
41-
groupadd --gid ${USER_GID} ${USERNAME}; \
42-
fi; \
43-
if ! id -u ${USERNAME} >/dev/null 2>&1; then \
44-
useradd -m -s /bin/bash -u ${USER_UID} -g ${USER_GID} ${USERNAME}; \
45-
fi; \
46-
# Ensure /workspaces exists and is owned by the non-root user so postCreateCommand can write
47-
mkdir -p /workspaces; \
48-
chown -R ${USERNAME}:${USERNAME} /workspaces /home/${USERNAME}
49-
5032
# Copy welcome message for Codespaces/Dev Containers
5133
COPY welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt
5234

53-
# Switch to the non-root user for the running container
54-
USER ${USERNAME}
5535
WORKDIR /workspaces

.devcontainer/devcontainer.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
{
22
"build": {
33
"context": ".",
4-
"dockerfile": "Dockerfile",
5-
"args": {
6-
"USERNAME": "serenity-js",
7-
"USER_UID": "1002",
8-
"USER_GID": "1002"
9-
}
4+
"dockerfile": "Dockerfile"
105
},
116

127
"features": {

0 commit comments

Comments
 (0)