Skip to content

Commit 9c7e204

Browse files
author
Bryan Latten
committed
Merge pull request #23 from bryanlatten/feature-ubuntu-base
Dockerfile: revert to ubuntu
2 parents 64409dc + b563109 commit 9c7e204

File tree

6 files changed

+25
-20
lines changed

6 files changed

+25
-20
lines changed

Dockerfile

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.3
1+
FROM ubuntu:14.04
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
@@ -10,22 +10,27 @@ ENV SIGNAL_BUILD_STOP=99 \
1010
NOT_ROOT_USER=docker
1111

1212
# Create an unprivileged user
13-
RUN adduser -D -S -H $NOT_ROOT_USER
13+
RUN useradd -r -s /bin/false $NOT_ROOT_USER
1414

15-
# IMPORTANT: update is *part* of the upgrade statement to ensure the latest on each build.
16-
# Note: sed/grep replace the less performant, less functional busybox versions
17-
RUN apk update && \
18-
apk upgrade && \
19-
apk add \
20-
sed \
21-
grep \
15+
RUN apt-get update && \
16+
apt-get install -yq \
17+
openssl \
18+
ca-certificates \
19+
software-properties-common \
2220
supervisor \
23-
nginx \
21+
nano \
2422
&& \
25-
rm -rf /var/cache/apk/*
23+
rm -rf /var/lib/apt/lists/*
2624

27-
# Overlay the root filesystem from this repo
25+
# Install latest nginx (development PPA is actually mainline development)
26+
RUN add-apt-repository ppa:nginx/development -y && \
27+
apt-get update -yq && \
28+
apt-get install -yq nginx \
29+
&& \
30+
rm -rf /var/lib/apt/lists/*
31+
32+
# # Overlay the root filesystem from this repo
2833
COPY ./container/root /
2934

3035
EXPOSE 80
31-
CMD ["/bin/sh", "/run.sh"]
36+
CMD ["/bin/bash", "/run.sh"]

container/root/etc/nginx/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# add to the run.d/nginx script
88
#############################################################
99

10-
user nobody;
10+
user www-data;
1111
worker_processes auto;
1212

1313
pid /tmp/nginx.pid;

container/root/init.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
RUN_SCRIPTS=/run.d
44
STATUS=0
@@ -13,7 +13,7 @@ for file in $RUN_SCRIPTS/*.sh; do
1313
echo "[init] executing ${file}"
1414

1515
# Note: -e will enforce that any subcommand that fails will fail the entire script run
16-
/bin/sh -e $file
16+
/bin/bash -e $file
1717

1818
STATUS=$? # Captures exit code from script that was run
1919

container/root/run.d/10-nginx.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
if [[ $SERVER_APP_NAME ]]
44
then

container/root/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
# Begin startup sequence
4-
/bin/sh -e /init.sh
4+
/bin/bash -e /init.sh
55

66
STATUS=$? # Captures exit code from script that was run
77

container/root/worker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
# Entrypoint for utilizing as a worker pool instead of a web server
44
# Based on configuration, can run multiple instances of a single worker process

0 commit comments

Comments
 (0)