Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions esim-cloud-backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM python:3.7-alpine3.13
# Builder stage 1: NGSpice and Compiling tools
FROM python:3.7-alpine3.13 as builder

ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
Expand Down Expand Up @@ -31,7 +32,11 @@ RUN curl -fSL https://github.com/imr/ngspice/archive/ngspice-$NGSPICE_VERSION.ta
&& make install \
&& apk del .build-deps

# Arduino Cli and Compiling tools
# Builder stage 2: Arduino CLI and Compiling tools
FROM python:3.7-alpine3.13 as arduino_builder

ENV USER=root

RUN apk add \
wget \
tar \
Expand Down Expand Up @@ -61,8 +66,19 @@ RUN arduino-cli core update-index \
&& find . -name ctags -exec ln -nsf /usr/bin/ctags {} \;


# Final stage
FROM python:3.7-alpine3.13

ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1

RUN apk add --no-cache libxt jpeg-dev zlib-dev libxaw-dev libx11-dev libtool mariadb-connector-c-dev libffi-dev postgresql-dev

COPY --from=builder /usr/local /usr/local
COPY --from=arduino_builder /usr/bin/arduino-cli /usr/bin/arduino-cli

WORKDIR /code

COPY requirements.txt /code/
RUN apk add --no-cache mariadb-connector-c-dev ;\
apk add --update alpine-sdk && \
Expand Down