Skip to content

Instantly share code, notes, and snippets.

@sjenning
Last active June 22, 2017 15:35
Show Gist options
  • Save sjenning/89e0322f42814d3aaeb0e0f5595d16cd to your computer and use it in GitHub Desktop.
Save sjenning/89e0322f42814d3aaeb0e0f5595d16cd to your computer and use it in GitHub Desktop.
#!/bin/bash
RELEASEVER=25
PACKAGES="bash dnf man passwd shadow-utils sudo vim-minimal iproute iputils bind-utils tar openssh-server openssh-clients procps-ng findutils"
set -euo pipefail
set -x
INSTALLROOT="$(mktemp -d)"
dnf -y --installroot "${INSTALLROOT}" --releasever "${RELEASEVER}" install ${PACKAGES}
pushd "${INSTALLROOT}"
rm -rf var/cache/yum/*
rm -f etc/machine-id
touch etc/machine-id
tar -cf - * | gzip > "${HOME}/fedora-${RELEASEVER}-wsl.tar.gz"
popd
rm -rf "${INSTALLROOT}"
@gbraad
Copy link

gbraad commented May 18, 2017

Got this as an automated build at: https://gitlab.com/gbraad/fedora-wsl, artifact at: http://gbraad.gitlab.io/fedora-wsl/fedora-25-wsl.tar.gz Manually triggered for now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment