update deps, add tini and curl, use COPY not ADD

This commit is contained in:
Bret Fisher
2021-01-29 16:47:09 -05:00
parent 71c87af450
commit 69c11f95a3
2 changed files with 22 additions and 4 deletions

View File

@@ -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 ./
@@ -16,4 +28,4 @@ ENV PORT 80
EXPOSE 80
CMD ["node", "server.js"]
CMD ["/tini", "--", "node", "server.js"]

View File

@@ -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