Skip to content

Commit 85c303d

Browse files
author
Mark Winterbottom
committed
Configured Vagrant and setup hello world script
1 parent 6770c73 commit 85c303d

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

Vagrantfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
# All Vagrant configuration is done below. The "2" in Vagrant.configure
5+
# configures the configuration version (we support older styles for
6+
# backwards compatibility). Please don't change it unless you know what
7+
# you're doing.
8+
Vagrant.configure("2") do |config|
9+
# The most common configuration options are documented and commented below.
10+
# For a complete reference, please see the online documentation at
11+
# https://docs.vagrantup.com.
12+
13+
# Every Vagrant development environment requires a box. You can search for
14+
# boxes at https://vagrantcloud.com/search.
15+
config.vm.box = "ubuntu/bionic64"
16+
config.vm.box_version = "~> 20190314.0.0"
17+
18+
config.vm.network "forwarded_port", guest: 8000, host: 8000
19+
20+
config.vm.provision "shell", inline: <<-SHELL
21+
systemctl disable apt-daily.service
22+
systemctl disable apt-daily.timer
23+
24+
sudo apt-get update
25+
sudo apt-get install -y python3-venv zip
26+
touch /home/vagrant/.bash_aliases
27+
if ! grep -q PYTHON_ALIAS_ADDED /home/vagrant/.bash_aliases; then
28+
echo "# PYTHON_ALIAS_ADDED" >> /home/vagrant/.bash_aliases
29+
echo "alias python='python3'" >> /home/vagrant/.bash_aliases
30+
fi
31+
SHELL
32+
end

hello_world.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print('Hello World!')

0 commit comments

Comments
 (0)