Skip to content

Commit 5f182b9

Browse files
authored
Merge pull request #58 from bryanlatten/feature-new-base
Dockerfile: updating to latest base
2 parents 7437ef4 + 8b286c4 commit 5f182b9

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM behance/docker-base:2.1
1+
FROM behance/docker-base:2.3
22
MAINTAINER Bryan Latten <[email protected]>
33

44
ENV CONTAINER_ROLE=web \
@@ -11,18 +11,18 @@ ENV CONTAINER_ROLE=web \
1111
EXPOSE ${CONTAINER_PORT}
1212

1313
# - Update security packages, only
14+
# - Install pre-reqs
15+
# - Install latest nginx (development PPA is actually mainline development)
16+
# - Perform cleanup, ensure unnecessary packages are removed
1417
RUN /bin/bash -e /security_updates.sh && \
15-
# Install pre-reqs \
1618
apt-get install --no-install-recommends -yqq \
1719
software-properties-common \
1820
&& \
19-
# Install latest nginx (development PPA is actually mainline development) \
2021
add-apt-repository ppa:nginx/development -y && \
2122
apt-get update -yqq && \
2223
apt-get install -yqq --no-install-recommends \
2324
nginx-light \
2425
&& \
25-
# Perform cleanup, ensure unnecessary packages are removed \
2626
apt-get remove --purge -yq \
2727
manpages \
2828
manpages-dev \
@@ -39,16 +39,16 @@ COPY ./container/root /
3939

4040
# Set nginx to listen on defined port
4141
# NOTE: order of operations is important, new config had to already installed from repo (above)
42+
# - Make temp directory for .nginx runtime files
43+
# - Some operations can be completely removed once this ticket is resolved:
44+
# - https://trac.nginx.org/nginx/ticket/1243
45+
# - Remove older WOFF mime-type
46+
# - Add again with newer mime-type
47+
# - Also add mime-type for WOFF2
4248
RUN sed -i "s/listen [0-9]*;/listen ${CONTAINER_PORT};/" $CONF_NGINX_SITE && \
43-
# Make temp directory for .nginx runtime files \
4449
mkdir /tmp/.nginx && \
45-
# Next three operations can be completely removed once this ticket is resolved:
46-
# https://trac.nginx.org/nginx/ticket/1243
47-
# Remove older WOFF mime-type
4850
sed -i "/application\/font-woff/d" /etc/nginx/mime.types && \
49-
# Add again with newer mime-type
5051
sed -i "s/}/\n font\/woff woff;&/" /etc/nginx/mime.types && \
51-
# Also add mime-type for WOFF2
5252
sed -i "s/}/\n font\/woff2 woff2;\n&/g" /etc/nginx/mime.types
5353

5454
RUN goss -g /tests/nginx/base.goss.yaml validate && \

Dockerfile-alpine

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM behance/docker-base:2.1-alpine
1+
FROM behance/docker-base:2.3-alpine
22
MAINTAINER Bryan Latten <[email protected]>
33

44
# Use in multi-phase builds, when an init process requests for the container to gracefully exit, so that it may be committed
@@ -24,20 +24,20 @@ RUN apk update --no-cache && \
2424
# Overlay the root filesystem from this repo
2525
COPY ./container/root /
2626

27-
# Set nginx to listen on defined port \
27+
# - Set nginx to listen on defined port
28+
# - Fix permissions to run unprivileged
29+
# - Make temp directory for .nginx runtime files
30+
# - Some operations can be completely removed once this ticket is resolved:
31+
# - https://trac.nginx.org/nginx/ticket/1243
32+
# - Remove older WOFF mime-type
33+
# - Add again with newer mime-type
34+
# - Also add mime-type for WOFF2
2835
RUN sed -i "s/listen [0-9]*;/listen ${CONTAINER_PORT};/" $CONF_NGINX_SITE && \
29-
# Fix permissions to run unprivileged
3036
bash -c "chown www-data:www-data /var/{lib,log}/nginx -Rh" && \
3137
bash -c "chmod 0755 -R /var/{lib,log}/nginx" && \
32-
# Make temp directory for .nginx runtime files \
3338
mkdir /tmp/.nginx && \
34-
# Next three operations can be completely removed once this ticket is resolved:
35-
# https://trac.nginx.org/nginx/ticket/1243
36-
# Remove older WOFF mime-type
3739
sed -i "/application\/font-woff/d" /etc/nginx/mime.types && \
38-
# Add again with newer mime-type
3940
sed -i "s/}/\n font\/woff woff;&/" /etc/nginx/mime.types && \
40-
# Also add mime-type for WOFF2
4141
sed -i "s/}/\n font\/woff2 woff2;\n&/g" /etc/nginx/mime.types
4242

4343
RUN goss -g /tests/nginx/base.goss.yaml validate && \

0 commit comments

Comments
 (0)