mirror of
https://github.com/nikdoof/docker-sthttpd.git
synced 2025-12-11 10:02:15 +00:00
Initial commit.
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
.idea
|
||||
sthttpd.tar.gz
|
||||
.vagrant
|
||||
11
Dockerfile
Normal file
11
Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
||||
# Minimal sthttpd container
|
||||
|
||||
FROM ubuntu
|
||||
MAINTAINER Andrew Williams <andy@tensixtyone.com>
|
||||
|
||||
ADD buildpackage.sh /tmp/
|
||||
ADD base_www /www
|
||||
RUN /tmp/buildpackage.sh
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["/usr/local/sbin/thttpd", "-p", "80", "-d", "/www"]
|
||||
8
Vagrantfile
vendored
Normal file
8
Vagrantfile
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "base"
|
||||
config.vm.provision "shell", inline: "chmod a+x /vagrant/buildpackage.sh && /vagrant/buildpackage.sh"
|
||||
|
||||
end
|
||||
9
base_www/index.html
Normal file
9
base_www/index.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<p>It worked. sthttpd is up and running.</p>
|
||||
</body>
|
||||
</html>
|
||||
13
buildpackage.sh
Normal file
13
buildpackage.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf /tmp/build /tmp/dist /tmp/*.gz
|
||||
apt-get update
|
||||
apt-get install -y build-essential automake curl
|
||||
curl ftp://opensource.dyc.edu/pub/sthttpd/sthttpd-2.26.3.tar.gz > /tmp/sthttpd.tar.gz
|
||||
mkdir -p /tmp/build /tmp/dist
|
||||
cd /tmp/build
|
||||
tar zxvf ../sthttpd.tar.gz
|
||||
cd /tmp/build/sthttpd*
|
||||
./configure
|
||||
addgroup --system thttpd
|
||||
make install
|
||||
Reference in New Issue
Block a user