Demosthene-OR commited on
Commit
611a720
1 Parent(s): bf6fe5c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -3
Dockerfile CHANGED
@@ -1,5 +1,4 @@
1
-
2
- # Use the official Python 3.9 image
3
  FROM python:3.10
4
 
5
  # Set the working directory to /code
@@ -13,8 +12,10 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
13
 
14
  # Set up a new user named "user" with user ID 1000
15
  RUN useradd -m -u 1000 user
 
16
  # Switch to the "user" user
17
  USER user
 
18
  # Set home to the user's home directory
19
  ENV HOME=/home/user \
20
  PATH=/home/user/.local/bin:$PATH
@@ -25,8 +26,11 @@ WORKDIR $HOME/app
25
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
26
  COPY --chown=user . $HOME/app
27
 
 
28
  FROM mysql:latest
29
 
 
30
  ENV MYSQL_ROOT_PASSWORD=Rakuten
31
 
32
- EXPOSE 3306
 
 
1
+ # Use the official Python 3.9 image as the base image
 
2
  FROM python:3.10
3
 
4
  # Set the working directory to /code
 
12
 
13
  # Set up a new user named "user" with user ID 1000
14
  RUN useradd -m -u 1000 user
15
+
16
  # Switch to the "user" user
17
  USER user
18
+
19
  # Set home to the user's home directory
20
  ENV HOME=/home/user \
21
  PATH=/home/user/.local/bin:$PATH
 
26
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
27
  COPY --chown=user . $HOME/app
28
 
29
+ # Use the official MySQL image as a base image
30
  FROM mysql:latest
31
 
32
+ # Set the root password for MySQL
33
  ENV MYSQL_ROOT_PASSWORD=Rakuten
34
 
35
+ # Expose the MySQL port
36
+ EXPOSE 3306