ankpan18 commited on
Commit
e12781e
·
1 Parent(s): 04e1813

updated dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +34 -20
Dockerfile CHANGED
@@ -1,33 +1,34 @@
 
1
  # FROM ubuntu/mysql
2
- FROM ubuntu
3
 
4
 
5
- RUN apt-get update && \
6
- apt-get -y upgrade && \
7
- apt-get install -y \
8
- sudo
9
 
10
  # Create ubuntu user with sudo privileges
11
- RUN useradd -ms /bin/bash ubuntu && \
12
- usermod -aG sudo ubuntu
13
  # New added for disable sudo password
14
- RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
15
- RUN su
16
 
17
- RUN DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-client mysql-server python3 pip mysql-server vim mc wget curl
18
 
19
 
20
- COPY . /app
21
- WORKDIR /app
22
- RUN pip install -r requirements.txt
23
 
24
 
25
- RUN echo "hello"
26
- CMD python3 -c "print('Docker is more simple Deployment Tool')"
27
 
28
  RUN pwd
29
  RUN ls -l
30
- COPY setup.sh /docker-entrypoint-initdb.d
31
  # RUN systemctl start mysql.service;
32
  # RUN sudo mysql;
33
  # RUN cat /etc/my.cnf
@@ -37,9 +38,9 @@ COPY setup.sh /docker-entrypoint-initdb.d
37
  # RUN /usr/bin/mysqld_safe && sleep 10s && mysql;
38
  # RUN whoami;
39
  # RUN mysql;
40
- RUN ls -l /var ;
41
- RUN chmod 755 setup.sh
42
- CMD ["/bin/bash", "setup.sh"]
43
  # RUN mysql -h 127.0.0.1 -P 30306 -u root;
44
  # RUN sudo mysql -h localhost -u root;
45
  # CMD mysql -h localhost -u root;
@@ -49,4 +50,17 @@ CMD ["/bin/bash", "setup.sh"]
49
 
50
 
51
  # ENTRYPOINT ["flask"]
52
- # CMD ["run", "--host=0.0.0.0","--port=7860"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM mysql
2
  # FROM ubuntu/mysql
3
+ # FROM ubuntu
4
 
5
 
6
+ # RUN apt-get update && \
7
+ # apt-get -y upgrade && \
8
+ # apt-get install -y \
9
+ # sudo
10
 
11
  # Create ubuntu user with sudo privileges
12
+ # RUN useradd -ms /bin/bash ubuntu && \
13
+ # usermod -aG sudo ubuntu
14
  # New added for disable sudo password
15
+ # RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
16
+ # RUN su
17
 
18
+ # RUN DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-client mysql-server python3 pip mysql-server vim mc wget curl
19
 
20
 
21
+ # COPY . /app
22
+ # WORKDIR /app
23
+ # RUN pip install -r requirements.txt
24
 
25
 
26
+ # RUN echo "hello"
27
+ # CMD python3 -c "print('Docker is more simple Deployment Tool')"
28
 
29
  RUN pwd
30
  RUN ls -l
31
+ # COPY setup.sh /docker-entrypoint-initdb.d
32
  # RUN systemctl start mysql.service;
33
  # RUN sudo mysql;
34
  # RUN cat /etc/my.cnf
 
38
  # RUN /usr/bin/mysqld_safe && sleep 10s && mysql;
39
  # RUN whoami;
40
  # RUN mysql;
41
+ # RUN ls -l /var ;
42
+ # RUN chmod 755 setup.sh
43
+ # CMD ["/bin/bash", "setup.sh"]
44
  # RUN mysql -h 127.0.0.1 -P 30306 -u root;
45
  # RUN sudo mysql -h localhost -u root;
46
  # CMD mysql -h localhost -u root;
 
50
 
51
 
52
  # ENTRYPOINT ["flask"]
53
+ # CMD ["run", "--host=0.0.0.0","--port=7860"]
54
+
55
+ # Set root password
56
+ # ENV MYSQL_ROOT_PASSWORD secret
57
+
58
+ # Copy database schema to docker-entrypoint-initdb.d directory
59
+ # This will run the schema when the container starts
60
+ # COPY test.sql /docker-entrypoint-initdb.d
61
+
62
+ # Expose port 3306 for MySQL server
63
+ EXPOSE 3306
64
+
65
+ # Run MySQL server in foreground
66
+ CMD ["mysqld"]