Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
samplemicroservices
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
madhuri.penikalapati
samplemicroservices
Commits
3902b51e
Commit
3902b51e
authored
Aug 05, 2023
by
madhuri.penikalapati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new file
parent
e7e51e64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
Dockerfile
Dockerfile
+23
-0
No files found.
Dockerfile
0 → 100644
View file @
3902b51e
# Use an official Python runtime as the base image
FROM
python:3.9-slim
# Set the working directory in the container
WORKDIR
/app
# Copy the dependencies file to the container at /app
COPY
requirements.txt .
# Install any needed packages specified in requirements.txt
RUN
pip
install
--no-cache-dir
-r
requirements.txt
# Copy the current directory contents into the container at /app
COPY
. .
# Make port 80 available to the world outside this container
EXPOSE
80
# Define environment variable
ENV
NAME FastAPI-Docker
# Run app.py when the container launches
CMD
["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment