Skip to content

Commit 6fac3a3

Browse files
authored
docs: add Docker build files (#181)
1 parent d89f890 commit 6fac3a3

File tree

5 files changed

+61
-6
lines changed

5 files changed

+61
-6
lines changed

Dockerfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
FROM alpine:3.8
2+
3+
# configure alpine and install packages
4+
RUN apk update
5+
RUN apk add --no-cache \
6+
build-base \
7+
libffi-dev \
8+
ruby \
9+
ruby-dev \
10+
ruby-bundler \
11+
ruby-webrick
12+
13+
RUN apk add libatomic readline readline-dev libxml2 libxml2-dev \
14+
ncurses-terminfo-base ncurses-terminfo \
15+
libxslt libxslt-dev zlib-dev zlib \
16+
yaml yaml-dev \
17+
ruby-io-console ruby-irb ruby-json ruby-rake ruby-rdoc ruby-bigdecimal
18+
19+
# configure gem
20+
RUN gem sources -c
21+
22+
# create working directory
23+
WORKDIR /build
24+
# copy gemfile
25+
COPY Gemfile /build/Gemfile
26+
COPY launch-script.sh /build/launch-script.sh
27+
28+
# install gems
29+
RUN gem install bundler -v 1.17.3
30+
RUN bundle install
31+
32+
# in case you wish to run site locally
33+
EXPOSE 4000
34+
35+
# Needs to mount /build/repo
36+
ENTRYPOINT [ "./launch-script.sh" ]

README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,31 @@ This is the source code of the website for the workflow and integration server C
55
The site is available at
66
[https://concord.walmartlabs.com](https://concord.walmartlabs.com).
77

8-
## Build
8+
## Build Using Docker
99

10+
Build the Docker image:
11+
12+
```shell
13+
cd concord-website
14+
docker build . -t concord-website-builder:latest
1015
```
11-
gem install bundler
16+
17+
Run the script:
18+
19+
```shell
20+
./docker-launch.sh
21+
```
22+
23+
The website should be available at http://localhost:4000
24+
25+
## Build Locally
26+
27+
```shell
28+
gem install bundler -v 1.17.3
1229
bundle install
1330
./native-launch.sh
1431
```
1532

1633
## Contribute
1734

1835
Feel free to submit pull requests or file issues. More info is available on https://concord.walmartlabs.com/overview/contribute.html
19-
20-

docker-launch-windows.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
docker run --rm --volume "%cd%:/build/repo" -p 4000:4000 <WALMART_DOCKER_REGISTRY_URL>/walmartlabs-strati-sde/websites-container:1.0.0
1+
docker run --rm --volume "%cd%:/build/repo" -p 4000:4000 concord-website-builder:latest

docker-launch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env sh
2-
IMG=<WALMART_DOCKER_REGISTRY_URL>/walmartlabs-strati-sde/websites-container:1.0.0
2+
IMG=concord-website-builder:latest
33
docker run --rm --volume "$PWD:/build/repo" -p 4000:4000 $IMG

launch-script.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
3+
bundle exec jekyll clean
4+
bundle exec jekyll serve --source /build/repo --host 0.0.0.0 --incremental "$@"

0 commit comments

Comments
 (0)