Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Dockerfile created and the user creation is currently commented.

The rootfs file is available only for test purpose.
  • Loading branch information
nunix committed Feb 2, 2024
1 parent 854e29c commit be6774d
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
@@ -1,2 +1,3 @@
# Auto detect text files and perform LF normalization
* text=auto
rootfs/limawolfi.tar filter=lfs diff=lfs merge=lfs -text
32 changes: 32 additions & 0 deletions Dockerfile
@@ -0,0 +1,32 @@
# syntax=docker/dockerfile:1
FROM cgr.dev/chainguard/wolfi-base:latest

# Install extra packages
COPY wsl-files/extra-packages /
RUN apk update && \
apk upgrade && \
grep -v '^#' /extra-packages | xargs apk add
RUN rm /extra-packages

# Add systemd symlink to init
RUN ln -s /usr/lib/systemd/systemd /sbin/init

# Add wsl.conf file
COPY wsl-files/wsl.conf /etc/wsl.conf

# # Create user
# ARG USERNAME=${username:-lima}
# ARG PASSWORD=${password:-lima}
# ARG USER_ID=1000
# ARG GROUP_ID=1000

# RUN addgroup -g $GROUP_ID $USERNAME && \
# adduser -D -u $USER_ID -G $USERNAME $USERNAME && \
# echo "$USERNAME:$PASSWORD" | chpasswd && \
# echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

# # Update wsl.conf file
# RUN sed -i "s/root/$USERNAME/g" /etc/wsl.conf

# # Fix su-exec permissions
# RUN chmod u+s /sbin/su-exec
1 change: 1 addition & 0 deletions README.md
@@ -0,0 +1 @@
Repo for Wolfi distro to be used with LIMA on Windows (WSL2)
3 changes: 3 additions & 0 deletions rootfs/limawolfi.tar
Git LFS file not shown
4 changes: 4 additions & 0 deletions wsl-files/extra-packages
@@ -0,0 +1,4 @@
systemd
mount
umount
bash
17 changes: 17 additions & 0 deletions wsl-files/wsl.conf
@@ -0,0 +1,17 @@
[automount]
enabled = true
options = "metadata,umask=0022,fmask=11,case=off"
mountFsTab = true
crossDistro = true

[user]
default = root

[network]
hostname = limawolfi
generateHosts = true
generateResolvConf = true

[boot]
systemd = true
command = mount --make-shared /

0 comments on commit be6774d

Please sign in to comment.