Last active
April 14, 2017 14:33
-
-
Save pizycki/74ba076da7a4b041abf03939208079ee to your computer and use it in GitHub Desktop.
Jekyll and 'My Stack Problems'
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
FROM ubuntu:xenial | |
MAINTAINER pizycki | |
EXPOSE 4000 35729 | |
RUN mkdir ~/izzydev | |
WORKDIR ~/izzydev | |
RUN \ | |
apt-get update && \ | |
apt-get install \ | |
ruby \ | |
git \ | |
nodejs \ | |
build-essential \ | |
patch \ | |
ruby-dev \ | |
zlib1g-dev \ | |
liblzma-dev -y && \ | |
gem install \ | |
jekyll \ | |
bundle && \ | |
git clone https://github.com/agusmakmun/agusmakmun.github.io . && \ | |
bundle update && \ | |
bundle install | |
CMD bundle exec jekyll serve |
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
# Requirements: Updated Windows 10 Anniversary Edition 64bit | |
# Enable Windows Developer mode | |
# Copied from http://stackoverflow.com/a/40033638/864968 | |
# Create AppModelUnlock if it doesn't exist, required for enabling Developer Mode | |
$RegistryKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" | |
if (-not(Test-Path -Path $RegistryKeyPath)) { | |
New-Item -Path $RegistryKeyPath -ItemType Directory -Force | |
} | |
# Add registry value to enable Developer Mode | |
New-ItemProperty -Path $RegistryKeyPath -Name AllowDevelopmentWithoutDevLicense -PropertyType DWORD -Value 1 | |
# Enable WSL | |
# Copied from http://www.thomasmaurer.ch/2016/11/how-to-install-linux-bash-on-windows-10/ | |
Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName Microsoft-Windows-Subsystem-Linux | |
Restart-Computer | |
# If you want uninstall/install subsystem, run those two commands. Run them seperetly. | |
# lxrun /uninstall /full | |
# lxrun /install |
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
# Install Jekyll | |
sudo apt-get install ruby jekyll -y | |
sudo gem install jekyll bundler | |
# Install 'My Stack Problems' dependencies | |
sudo gem install devkit | |
# Install Nokogiri | |
sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev -y |
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
An error occurred while installing RedCloth (4.2.9) | |
Solve: sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev -y | |
An error occurred while installing json (1.8.1), and Bundler cannot | |
continue. | |
Make sure that `gem install json -v '1.8.1'` succeeds before bundling. | |
Solve: bundle update | |
Solve: change version in `Gemfile.lock` to 1.8.6 | |
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
# optional, but recommended | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA300B7755AFCFAE | |
# add Typora's repository | |
sudo add-apt-repository 'deb https://typora.io ./linux/' | |
sudo apt-get update | |
# install typora | |
sudo apt-get install typora |
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
# Get&Run: | |
# curl < URL > -o ~/install-jekyll.sh && bash ~/install-jekyll.sh | |
# Print Ubuntu version | |
lsb_release -a | |
# Upgrade Ubuntu to latest | |
sudo do-release-upgrade | |
# Install software | |
sudo apt-add-repository ppa:brightbox/ruby-ng | |
sudo apt-get update | |
sudo apt-get install -y ruby2.3 git nodejs build-essential patch ruby2.3-dev zlib1g-dev liblzma-dev | |
sudo gem install jekyll bundler | |
# Clone project | |
mkdir ~/dev | |
git clone https://github.com/pizycki/pizycki.github.io ~/dev/izzydev | |
cd ~/dev/izzydev | |
# Build and run | |
bundle install | |
bundle exec jekyll serve --no-watch |
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
cd <root> | |
bundle exec jekyll serve |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment