Skip to content

Commit

Permalink
feat: add alpine based for images
Browse files Browse the repository at this point in the history
Based on work of @jovandeginste see :
#463 (comment)
  • Loading branch information
DavidHenryThoreau authored and DavidHenryThoreau committed May 15, 2024
1 parent 40841a6 commit 954f6ac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10
FROM python:3.10-slim

# set working directory
RUN mkdir -p /usr/src/app
Expand All @@ -7,13 +7,16 @@ WORKDIR /usr/src/app
# copy source files
COPY . /usr/src/app

# install gcc
RUN apt update && apt install gcc python3-dev

# install requirements
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip install --upgrade pip
RUN pip install poetry
RUN . $VIRTUAL_ENV/bin/activate && poetry install --no-interaction --quiet
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir poetry
RUN . $VIRTUAL_ENV/bin/activate && poetry install --no-interaction

# run fittrackee server
CMD flask run --with-threads -h 0.0.0.0
CMD flask run --with-threads -h 0.0.0.0
7 changes: 4 additions & 3 deletions fittrackee_client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18
FROM node:18-alpine

MAINTAINER [email protected]

Expand All @@ -18,7 +18,8 @@ ENV VITE_APP_API_URL $VITE_APP_API_URL
# install dependencies
COPY package.json /usr/src/app/package.json
COPY yarn.lock /usr/src/app/yarn.lock
RUN yarn install --silent
RUN yarn install --silent && yarn cache clean --force
RUN npm run build

# copy source
COPY . /usr/src/app/
COPY . /usr/src/app/

0 comments on commit 954f6ac

Please sign in to comment.