blob: 4f32b48cfebf516ff70b818a50feb81906c9eebb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# s2i builder for jekyll sites
## Deploy in openshift
```
oc new-app kraxel/s2i-jekyll~git://some.host/your/repo.git
```
## Work with the builder image sources
### Create the builder image
The following command will create a builder image named kraxel/s2i-jekyll based on the Dockerfile that was created previously.
```
docker build -t kraxel/s2i-jekyll .
```
The builder image can also be created by using the *make* command since a *Makefile* is included.
### Creating the application image
The application image combines the builder image with your applications source code, which is served using whatever application is installed via the *Dockerfile*, compiled using the *assemble* script, and run using the *run* script.
The following command will create the application image:
```
s2i build test/test-app kraxel/s2i-jekyll kraxel/s2i-jekyll-app
---> Building and installing application from source...
```
Using the logic defined in the *assemble* script, s2i will now create an application image using the builder image as a base and including the source code from the test/test-app directory.
### Running the application image
Running the application image is as simple as invoking the docker run command:
```
docker run -d -p 8080:8080 kraxel/s2i-jekyll-app
```
The application, which consists of a simple static web page, should now be accessible at [http://localhost:8080](http://localhost:8080).
|