Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Ijaz Ahmad
Docker-Bootcamp
Commits
66b763b5
Commit
66b763b5
authored
Apr 25, 2017
by
NaveenKJ
Browse files
Code files added
parent
edef61db
Changes
57
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
283 additions
and
0 deletions
+283
-0
Chapter02/.DS_Store
Chapter02/.DS_Store
+0
-0
Chapter02/build_01_maintainer/.DS_Store
Chapter02/build_01_maintainer/.DS_Store
+0
-0
Chapter02/build_01_maintainer/Dockerfile
Chapter02/build_01_maintainer/Dockerfile
+5
-0
Chapter02/build_02_run/.DS_Store
Chapter02/build_02_run/.DS_Store
+0
-0
Chapter02/build_02_run/Dockerfile
Chapter02/build_02_run/Dockerfile
+6
-0
Chapter02/build_03_copy/.DS_Store
Chapter02/build_03_copy/.DS_Store
+0
-0
Chapter02/build_03_copy/Dockerfile
Chapter02/build_03_copy/Dockerfile
+11
-0
Chapter02/build_03_copy/files/default.conf
Chapter02/build_03_copy/files/default.conf
+34
-0
Chapter02/build_03_copy/files/nginx.conf
Chapter02/build_03_copy/files/nginx.conf
+46
-0
Chapter02/build_03_copy/files/supervisord.conf
Chapter02/build_03_copy/files/supervisord.conf
+32
-0
Chapter02/build_03_copy/start.sh
Chapter02/build_03_copy/start.sh
+3
-0
Chapter02/build_04_add/.DS_Store
Chapter02/build_04_add/.DS_Store
+0
-0
Chapter02/build_04_add/Dockerfile
Chapter02/build_04_add/Dockerfile
+14
-0
Chapter02/build_04_add/files/default.conf
Chapter02/build_04_add/files/default.conf
+34
-0
Chapter02/build_04_add/files/nginx.conf
Chapter02/build_04_add/files/nginx.conf
+46
-0
Chapter02/build_04_add/files/supervisord.conf
Chapter02/build_04_add/files/supervisord.conf
+32
-0
Chapter02/build_04_add/start.sh
Chapter02/build_04_add/start.sh
+3
-0
Chapter02/build_04_add/webroot.tar
Chapter02/build_04_add/webroot.tar
+0
-0
Chapter02/build_05_expose/.DS_Store
Chapter02/build_05_expose/.DS_Store
+0
-0
Chapter02/build_05_expose/Dockerfile
Chapter02/build_05_expose/Dockerfile
+17
-0
No files found.
Chapter02/.DS_Store
0 → 100644
View file @
66b763b5
File added
Chapter02/build_01_maintainer/.DS_Store
0 → 100644
View file @
66b763b5
File added
Chapter02/build_01_maintainer/Dockerfile
0 → 100644
View file @
66b763b5
# Example Dockerfile showing MAINTAINER
FROM
alpine:latest
MAINTAINER
Russ McKendrick <russ@mckendrick.io>
Chapter02/build_02_run/.DS_Store
0 → 100644
View file @
66b763b5
File added
Chapter02/build_02_run/Dockerfile
0 → 100644
View file @
66b763b5
# Example Dockerfile showing RUN
FROM
alpine:latest
MAINTAINER
Russ McKendrick <russ@mckendrick.io>
RUN
apk add
--update
supervisor nginx
&&
rm
-rf
/var/cache/apk/
*
\ No newline at end of file
Chapter02/build_03_copy/.DS_Store
0 → 100644
View file @
66b763b5
File added
Chapter02/build_03_copy/Dockerfile
0 → 100644
View file @
66b763b5
# Example Dockerfile showing COPY
FROM
alpine:latest
MAINTAINER
Russ McKendrick <russ@mckendrick.io>
RUN
apk add
--update
supervisor nginx
&&
rm
-rf
/var/cache/apk/
*
COPY
start.sh /script/
COPY
files/default.conf /etc/nginx/conf.d/
COPY
files/nginx.conf /etc/nginx/nginx.conf
COPY
files/supervisord.conf /etc/supervisord.conf
\ No newline at end of file
Chapter02/build_03_copy/files/default.conf
0 → 100644
View file @
66b763b5
#
# The default server
#
server
{
listen
80
default_server
;
server_name
_
;
root
/
var
/
www
/
html
;
#charset koi8-r;
access_log
/
var
/
log
/
nginx
/
access
.
log
main
;
error_log
/
var
/
log
/
nginx
/
error
.
log
;
location
/ {
index
index
.
html
index
.
htm
index
.
php
;
}
error_page
404
/
404
.
html
;
location
= /
404
.
html
{
root
/
usr
/
share
/
nginx
/
html
;
}
# redirect server error pages to the static page /50x.html
#
error_page
500
502
503
504
/
50
x
.
html
;
location
= /
50
x
.
html
{
root
/
usr
/
share
/
nginx
/
html
;
}
location
~ /\.
ht
{
deny
all
;
}
}
Chapter02/build_03_copy/files/nginx.conf
0 → 100644
View file @
66b763b5
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user
nginx
;
worker_processes
1
;
daemon
off
;
error_log
/var/log/nginx/error.log
;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
pid
/run/nginx.pid
;
events
{
worker_connections
1024
;
}
http
{
include
/etc/nginx/mime.types
;
default_type
application/octet-stream
;
log_format
main
'
$remote_addr
-
$remote_user
[
$time_local
]
"
$request
"
'
'
$status
$body_bytes_sent
"
$http_referer
"
'
'"
$http_user_agent
"
"
$http_x_forwarded_for
"'
;
access_log
/var/log/nginx/access.log
main
;
sendfile
on
;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout
65
;
#gzip on;
index
index.html
index.htm
;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include
/etc/nginx/conf.d/*.conf
;
}
\ No newline at end of file
Chapter02/build_03_copy/files/supervisord.conf
0 → 100644
View file @
66b763b5
[
unix_http_server
]
file
=/
tmp
/
supervisor
.
sock
; (
the
path
to
the
socket
file
)
[
supervisord
]
logfile
=/
tmp
/
supervisord
.
log
; (
main
log
file
;
default
$
CWD
/
supervisord
.
log
)
logfile_maxbytes
=
5
MB
; (
max
main
logfile
bytes
b4
rotation
;
default
50
MB
)
pidfile
=/
tmp
/
supervisord
.
pid
; (
supervisord
pidfile
;
default
supervisord
.
pid
)
user
=
root
nodaemon
=
true
stdout_logfile
=/
dev
/
stdout
stdout_logfile_maxbytes
=
0
[
rpcinterface
:
supervisor
]
supervisor
.
rpcinterface_factory
=
supervisor
.
rpcinterface
:
make_main_rpcinterface
[
supervisorctl
]
serverurl
=
unix
:///
tmp
/
supervisor
.
sock
;
use
a
unix
://
URL
for
a
unix
socket
[
program
:
start
]
command
=/
script
/
start
.
sh
autostart
=
true
autorestart
=
false
startsecs
=
1
startretries
=
0
redirect_stderr
=
false
redirect_stderr
=
false
[
program
:
nginx
]
command
=/
usr
/
sbin
/
nginx
autostart
=
true
stdout_events_enabled
=
true
stderr_events_enabled
=
true
\ No newline at end of file
Chapter02/build_03_copy/start.sh
0 → 100644
View file @
66b763b5
#!/bin/sh
hostname
=
`
hostname
-f
`
sed
-i
"s/XXX/
${
hostname
}
/"
/var/www/html/index.html
\ No newline at end of file
Chapter02/build_04_add/.DS_Store
0 → 100644
View file @
66b763b5
File added
Chapter02/build_04_add/Dockerfile
0 → 100644
View file @
66b763b5
# Example Dockerfile showing ADD
FROM
alpine:latest
MAINTAINER
Russ McKendrick <russ@mckendrick.io>
RUN
apk add
--update
supervisor nginx
&&
rm
-rf
/var/cache/apk/
*
COPY
start.sh /script/
COPY
files/default.conf /etc/nginx/conf.d/
COPY
files/nginx.conf /etc/nginx/nginx.conf
COPY
files/supervisord.conf /etc/supervisord.conf
ADD
webroot.tar /
RUN
chown
-R
nginx:nginx /var/www/html
\ No newline at end of file
Chapter02/build_04_add/files/default.conf
0 → 100644
View file @
66b763b5
#
# The default server
#
server
{
listen
80
default_server
;
server_name
_
;
root
/
var
/
www
/
html
;
#charset koi8-r;
access_log
/
var
/
log
/
nginx
/
access
.
log
main
;
error_log
/
var
/
log
/
nginx
/
error
.
log
;
location
/ {
index
index
.
html
index
.
htm
index
.
php
;
}
error_page
404
/
404
.
html
;
location
= /
404
.
html
{
root
/
usr
/
share
/
nginx
/
html
;
}
# redirect server error pages to the static page /50x.html
#
error_page
500
502
503
504
/
50
x
.
html
;
location
= /
50
x
.
html
{
root
/
usr
/
share
/
nginx
/
html
;
}
location
~ /\.
ht
{
deny
all
;
}
}
Chapter02/build_04_add/files/nginx.conf
0 → 100644
View file @
66b763b5
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user
nginx
;
worker_processes
1
;
daemon
off
;
error_log
/var/log/nginx/error.log
;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
pid
/run/nginx.pid
;
events
{
worker_connections
1024
;
}
http
{
include
/etc/nginx/mime.types
;
default_type
application/octet-stream
;
log_format
main
'
$remote_addr
-
$remote_user
[
$time_local
]
"
$request
"
'
'
$status
$body_bytes_sent
"
$http_referer
"
'
'"
$http_user_agent
"
"
$http_x_forwarded_for
"'
;
access_log
/var/log/nginx/access.log
main
;
sendfile
on
;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout
65
;
#gzip on;
index
index.html
index.htm
;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include
/etc/nginx/conf.d/*.conf
;
}
\ No newline at end of file
Chapter02/build_04_add/files/supervisord.conf
0 → 100644
View file @
66b763b5
[
unix_http_server
]
file
=/
tmp
/
supervisor
.
sock
; (
the
path
to
the
socket
file
)
[
supervisord
]
logfile
=/
tmp
/
supervisord
.
log
; (
main
log
file
;
default
$
CWD
/
supervisord
.
log
)
logfile_maxbytes
=
5
MB
; (
max
main
logfile
bytes
b4
rotation
;
default
50
MB
)
pidfile
=/
tmp
/
supervisord
.
pid
; (
supervisord
pidfile
;
default
supervisord
.
pid
)
user
=
root
nodaemon
=
true
stdout_logfile
=/
dev
/
stdout
stdout_logfile_maxbytes
=
0
[
rpcinterface
:
supervisor
]
supervisor
.
rpcinterface_factory
=
supervisor
.
rpcinterface
:
make_main_rpcinterface
[
supervisorctl
]
serverurl
=
unix
:///
tmp
/
supervisor
.
sock
;
use
a
unix
://
URL
for
a
unix
socket
[
program
:
start
]
command
=/
script
/
start
.
sh
autostart
=
true
autorestart
=
false
startsecs
=
1
startretries
=
0
redirect_stderr
=
false
redirect_stderr
=
false
[
program
:
nginx
]
command
=/
usr
/
sbin
/
nginx
autostart
=
true
stdout_events_enabled
=
true
stderr_events_enabled
=
true
\ No newline at end of file
Chapter02/build_04_add/start.sh
0 → 100644
View file @
66b763b5
#!/bin/sh
hostname
=
`
hostname
-f
`
sed
-i
"s/XXX/
${
hostname
}
/"
/var/www/html/index.html
\ No newline at end of file
Chapter02/build_04_add/webroot.tar
0 → 100644
View file @
66b763b5
File added
Chapter02/build_05_expose/.DS_Store
0 → 100644
View file @
66b763b5
File added
Chapter02/build_05_expose/Dockerfile
0 → 100644
View file @
66b763b5
# Example Dockerfile showing EXPOSE
FROM
alpine:latest
MAINTAINER
Russ McKendrick <russ@mckendrick.io>
RUN
apk add
--update
supervisor nginx
&&
rm
-rf
/var/cache/apk/
*
COPY
start.sh /script/
COPY
files/default.conf /etc/nginx/conf.d/
COPY
files/nginx.conf /etc/nginx/nginx.conf
COPY
files/supervisord.conf /etc/supervisord.conf
ADD
webroot.tar /
RUN
chown
-R
nginx:nginx /var/www/html
EXPOSE
80/tcp
\ No newline at end of file
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment