Skip to content

Commit

Permalink
update deps, add tini and curl, use COPY not ADD
Browse files Browse the repository at this point in the history
  • Loading branch information
BretFisher committed Jan 29, 2021
1 parent 71c87af commit 69c11f9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
14 changes: 13 additions & 1 deletion result/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
FROM node:10-slim

# add curl for healthcheck
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*

# Add Tini for proper init of signals
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini

WORKDIR /app

# have nodemon available for local dev use (file watching)
RUN npm install -g nodemon

COPY package*.json ./
Expand All @@ -16,4 +28,4 @@ ENV PORT 80

EXPOSE 80

CMD ["node", "server.js"]
CMD ["/tini", "--", "node", "server.js"]
12 changes: 9 additions & 3 deletions vote/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# Using official python runtime base image
FROM python:2.7-alpine
FROM python:3.9-slim

# add curl for healthcheck
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*

# Set the application directory
WORKDIR /app

# Install our requirements.txt
ADD requirements.txt /app/requirements.txt
COPY requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt

# Copy our code from the current folder to /app inside the container
ADD . /app
COPY . .

# Make port 80 available for links and/or publish
EXPOSE 80
Expand Down

0 comments on commit 69c11f9

Please sign in to comment.