Skip to content

Commit

Permalink
SB-06:fix: api service&command-service docker file issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
divyagovindaiah committed Oct 26, 2023
1 parent d26c2ca commit ccd451c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
9 changes: 0 additions & 9 deletions api-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# FROM node:18-alpine
# RUN mkdir -p /opt/api-service
# WORKDIR /opt
# COPY api-service/package.json
# WORKDIR /opt/api-service
# RUN npm install
# EXPOSE 3000
# CMD ["npm", "run", "start"]

FROM --platform=linux/amd64 node:20-alpine
RUN mkdir -p /opt/obsrv-api-service
WORKDIR /opt/obsrv-api-service/
Expand Down
19 changes: 1 addition & 18 deletions command-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
# FROM ubuntu:latest AS ubuntu
# RUN apt-get update && apt-get install -y curl

# RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
# RUN chmod +x ./kubectl
# RUN mv ./kubectl /usr/local/bin

# FROM --platform=linux/amd64 python:3.10-alpine
# COPY --from=ubuntu /usr/local/bin /usr/local/bin
# WORKDIR /app
# COPY . .
# WORKDIR /app/command-service
# RUN pip install --no-cache-dir -r requirements.txt
# COPY . .
# WORKDIR /app/src
# CMD [ "uvicorn", "routes:app", "--host", "0.0.0.0" ]

FROM ubuntu:latest AS ubuntu
RUN apt-get update && apt-get install -y curl

Expand All @@ -27,6 +10,6 @@ COPY --from=ubuntu /usr/local/bin /usr/local/bin
WORKDIR /app
COPY command-service/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY src ./src
COPY command-service/src ./src
WORKDIR /app/src
CMD [ "uvicorn", "routes:app", "--host", "0.0.0.0" ]

0 comments on commit ccd451c

Please sign in to comment.