Skip to content

Commit c872b36

Browse files
jamesbrinkdoomspork
authored andcommitted
Update dependencies and Docker build. (#16)
Update npm dependencies Update Dockerfile to build using nodejs 12.6.0 Update Docker runtime image to alpine:3.10 Add MIT LICENSE file Update README.md with updated docker image location. Update docker entrypoint to print http link on startup.
1 parent e2bcae7 commit c872b36

File tree

8 files changed

+10992
-10780
lines changed

8 files changed

+10992
-10780
lines changed

.dockerignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
.git
22
.gitignore
33
.travis.yml
4-
Dockerfile
5-
README.md
64
build
5+
Dockerfile
76
hooks
7+
LICENSE
88
node_modules
9+
README.md

Dockerfile

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This is the build container.
2-
FROM node:11.6.0-alpine as build_container
2+
FROM node:12.6.0-alpine as build_container
33

44
# Copy the assets into the build container.
55
COPY ./ /colorsplash
@@ -14,7 +14,7 @@ RUN set -xe; \
1414
npm run build;
1515

1616
# This is the runtime image.
17-
FROM alpine:3.8
17+
FROM alpine:3.10
1818

1919
# Build arguments.
2020
ARG VCS_REF
@@ -24,13 +24,14 @@ ARG LANG="en_US.UTF-8"
2424

2525
# Labels / Metadata.
2626
LABEL maintainer="James Brink, [email protected]" \
27-
decription="Colorsplash" \
28-
version="${VERSION}" \
29-
org.label-schema.name="colorsplash" \
3027
org.label-schema.build-date="${BUILD_DATE}" \
28+
org.label-schema.decription="Colorsplash" \
29+
org.label-schema.name="colorsplash" \
30+
org.label-schema.schema-version="1.0.0-rc1" \
3131
org.label-schema.vcs-ref="${VCS_REF}" \
3232
org.label-schema.vcs-url="https://github.com/utensils/colorsplash" \
33-
org.label-schema.schema-version="1.0.0-rc1"
33+
org.label-schema.vendor="Utensils" \
34+
org.label-schema.version="${VERSION}"
3435

3536
# Create our group & user.
3637
RUN set -xe; \

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Utensils Union
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,17 @@
22

33
## About
44
ColorSplash generates random colors and gradients, that's it.
5-
It was built as a demonstration of [ReactJS](https://reactjs.org) and [Bulma CSS](https://bulma.io) technologies.
5+
It was built as a demonstration of [ReactJS](https://reactjs.org) and [Bulma CSS](https://bulma.io) technologies.
66

77
## Running
88

9-
A simple Dockerfile has been included to build and run locally. The following will build and expose the app on
9+
A simple Docker image has been included to run locally. The following will run and expose the app on
1010
[http://localhost:8080/](http://localhost:8080/)
1111

1212
```shell
13-
docker build -t colorsplash .
14-
docker run -i -t -p 8080:8080 colorsplash
13+
docker run -i -t -p 8080:8080 utensils/colorsplash
1514
```
1615

17-
1816
## Contributing
1917

2018
Contributions of are always welcomed.

docker-assets/usr/local/bin/docker-entrypoint.sh

+4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33
if [ $# -ne 0 ]; then
44
exec "$@"
55
else
6+
echo "Starting httpd"
67
lighttpd -f /usr/local/etc/lighthttpd/http.conf -D &
78
httpd_pid="$!"
89
trap "echo 'Stopping lighthttpd - pid: $httpd_pid'; kill -SIGTERM $httpd_pid" SIGINT SIGTERM
910

11+
sleep 2
12+
echo "ColorSplash available at: http://localhost:8080/"
13+
1014
# Wait for httpd process to end.
1115
while kill -0 $httpd_pid >/dev/null 2>&1; do
1216
wait

0 commit comments

Comments
 (0)