Skip to content

Commit

Permalink
Change alice to user
Browse files Browse the repository at this point in the history
  • Loading branch information
kwankyu committed Oct 17, 2024
1 parent c2b671c commit e9f6e9d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/create-wsl-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,15 @@ jobs:
run: |
cat << EOF > download_and_import_sagemath_to_wsl.ps1
\$artifactUrl = "https://github.com/sagemath/sage-binder-env/releases/download/v$VERSION/sagemath-$VERSION-wsl.zip"
\$zipFilePath = "\$PWD\\artifact.zip"
\$extractPath = "\$PWD"
# Download the artifact
Invoke-WebRequest -Uri \$artifactUrl -OutFile \$zipFilePath
# Unzip the artifact
Expand-Archive -Path \$zipFilePath -DestinationPath \$extractPath
Expand-Archive -Path \$zipFilePath
# Import the WSL image
wsl --import SageMath-$VERSION \$extractPath \$extractPath\\sagemath-$VERSION-wsl.tar
# Remove the downloaded zip file after successful WSL import
wsl --import SageMath-$VERSION sagemath-$VERSION-wsl.tar
# Set the default user
wsl -d SageMath-$VERSION --user user
Remove-Item \$zipFilePath
EOF
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ FROM ghcr.io/sagemath/sage-binder-env:10.4

USER root

# Create user alice with uid 1000
ARG NB_USER=alice
# Create user with uid 1000
ARG NB_USER=user
ARG NB_UID=1000
ENV NB_USER alice
ENV NB_USER user
ENV NB_UID 1000
ENV HOME /home/${NB_USER}
RUN adduser --disabled-password --gecos "Default user" --uid ${NB_UID} ${NB_USER}
Expand Down

0 comments on commit e9f6e9d

Please sign in to comment.