Skip to content

Commit 45f5343

Browse files
committed
Merge pull request dockersamples#14 from ManoMarks/master
Porting to Alpine images
2 parents 10a3a3b + 3978756 commit 45f5343

File tree

7 files changed

+15
-13
lines changed

7 files changed

+15
-13
lines changed

docker-compose.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ services:
3434
- back-tier
3535

3636
redis:
37-
image: redis
37+
image: redis:alpine
3838
ports: ["6379"]
3939
networks:
4040
- back-tier
@@ -52,5 +52,3 @@ volumes:
5252
networks:
5353
front-tier:
5454
back-tier:
55-
56-

result-app/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM node:0.10
1+
FROM node:5.11.0-slim
22

3-
RUN mkdir /app
43
WORKDIR /app
54

65
ADD package.json /app/package.json
6+
RUN npm config set registry http://registry.npmjs.org
77
RUN npm install && npm ls
88
RUN mv /app/node_modules /node_modules
99

result-app/views/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<base href="/index.html">
77
<meta name = "viewport" content = "width=device-width, initial-scale = 1.0">
88
<meta name="keywords" content="docker-compose, docker, stack">
9-
<meta name="author" content="Tutum dev team">
9+
<meta name="author" content="Docker">
1010
<link rel='stylesheet' href='/stylesheets/style.css' />
1111
</head>
1212
<body ng-controller="statsCtrl" >

voting-app/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Using official python runtime base image
2-
FROM python:2.7
2+
FROM python:2.7-alpine
33

44
# Set the application directory
55
WORKDIR /app
@@ -11,8 +11,8 @@ RUN pip install -r requirements.txt
1111
# Copy our code from the current folder to /app inside the container
1212
ADD . /app
1313

14-
# Make port 5000 available for links and/or publish
15-
EXPOSE 80
14+
# Make port 80 available for links and/or publish
15+
EXPOSE 80
1616

1717
# Define our command to be run when launching the container
1818
CMD ["python", "app.py"]

voting-app/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ def hello():
4141

4242

4343
if __name__ == "__main__":
44-
app.run(host='0.0.0.0', port=80, debug=True)
44+
app.run(host='0.0.0.0', port=80, debug=True)

voting-app/utils/__init__.pyc

647 Bytes
Binary file not shown.

worker/Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
FROM java:7
1+
FROM java:openjdk-8-jdk-alpine
22

3-
RUN apt-get update -qq && apt-get install -y maven && apt-get clean
3+
RUN MAVEN_VERSION=3.3.3 \
4+
&& cd /usr/share \
5+
&& wget http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz -O - | tar xzf - \
6+
&& mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven \
7+
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
48

59
WORKDIR /code
610

@@ -12,4 +16,4 @@ RUN ["mvn", "verify"]
1216
ADD src /code/src
1317
RUN ["mvn", "package"]
1418

15-
CMD ["/usr/lib/jvm/java-7-openjdk-amd64/bin/java", "-jar", "target/worker-jar-with-dependencies.jar"]
19+
CMD ["java", "-jar", "target/worker-jar-with-dependencies.jar"]

0 commit comments

Comments
 (0)