Skip to content

Commit

Permalink
Fix missed Dockerfile update (#945)
Browse files Browse the repository at this point in the history
Closes #941

Testing:
Manual testing - building and running demo_server test cases locally. This is not currently covered by CI tests.
  • Loading branch information
marina-p authored Jan 30, 2025
1 parent 15c170a commit eaacd92
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 21 deletions.
14 changes: 11 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine as builder
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS builder

RUN apk add --no-cache python3 py3-pip

Expand All @@ -10,9 +10,17 @@ RUN python3 build-restler.py --dest_dir /build

RUN python3 -m compileall -b /build/engine

FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine as target
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS target

RUN apk add --no-cache python3 py3-pip
RUN pip3 install requests applicationinsights

# Create a virtual environment
RUN python3 -m venv /venv

# Activate the virtual environment and install packages
RUN /venv/bin/pip install applicationinsights requests

# Ensure the virtual environment is activated by default
ENV PATH="/venv/bin:$PATH"

COPY --from=builder /build /RESTler
4 changes: 2 additions & 2 deletions demo_server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8-alpine
FROM python:3.12-alpine

RUN apk add --no-cache build-base

Expand All @@ -11,7 +11,7 @@ RUN pip install -r requirements.txt

EXPOSE 8888

ENV DEMO_SERVER_PORT 8888
ENV DEMO_SERVER_PORT=8888
ENV DEMO_SERVER_HOST=0.0.0.0

CMD ["python", "demo_server/app.py"]
42 changes: 26 additions & 16 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine

COPY ./compiler /RESTler/compiler
COPY ./restler /RESTler/restler

#Get the source code for the engine, and
#copy source code to the image
#RESTler Python dependency
RUN apk add --no-cache python3
RUN python3 -m ensurepip
RUN pip3 install --upgrade pip
RUN pip3 install requests
RUN pip3 install applicationinsights
COPY ./engine /RESTler/engine
RUN python3 -m compileall -b /RESTler/engine
COPY ./resultsAnalyzer /RESTler/resultsAnalyzer
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS builder

RUN apk add --no-cache python3 py3-pip

COPY src ./src
COPY restler ./restler
COPY build-restler.py .

RUN python3 build-restler.py --dest_dir /build

RUN python3 -m compileall -b /build/engine

FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS target

RUN apk add --no-cache python3 py3-pip

# Create a virtual environment
RUN python3 -m venv /venv

# Activate the virtual environment and install packages
RUN /venv/bin/pip install applicationinsights requests

# Ensure the virtual environment is activated by default
ENV PATH="/venv/bin:$PATH"

COPY --from=builder /build /RESTler

0 comments on commit eaacd92

Please sign in to comment.