Spaces:
Runtime error
Runtime error
| FROM ubuntu/mysql | |
| # FROM ubuntu | |
| USER root | |
| # RUN mkdir /run/sshd | |
| # RUN chown sshuser:sshuser /run/sshd | |
| # Get the basic stuff | |
| RUN apt-get update && \ | |
| apt-get -y upgrade && \ | |
| apt-get install -y \ | |
| sudo | |
| # Create ubuntu user with sudo privileges | |
| RUN useradd -ms /bin/bash ubuntu && \ | |
| usermod -aG sudo ubuntu | |
| # New added for disable sudo password | |
| RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | |
| RUN su | |
| # RUN sudo apt-get purge mysql* | |
| # RUN sudo apt-get autoremove | |
| # RUN sudo apt-get autoclean | |
| # RUN sudo apt-get dist-upgrade | |
| # mysql-server \ | |
| RUN sudo apt-get install -y --no-install-recommends \ | |
| python3 \ | |
| python3-setuptools \ | |
| python3-pip \ | |
| python3-dev \ | |
| python3-venv \ | |
| git \ | |
| && \ | |
| apt-get clean && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # RUN cat /var/log/mysql/error.log | |
| COPY . /app | |
| WORKDIR /app | |
| RUN pip install -r requirements.txt | |
| RUN echo "hello" | |
| CMD python3 -c "print('Docker is more simple Deployment Tool')" | |
| RUN pwd | |
| RUN ls -l | |
| COPY setup.sh /docker-entrypoint-initdb.d | |
| # RUN systemctl start mysql.service; | |
| # RUN sudo mysql; | |
| # RUN cat /etc/my.cnf | |
| # RUN cat /etc/mysql/my.cnf | |
| # RUN cat /var/lib/mysql/my.cnf | |
| # RUN mysql -h 127.0.0.1 -P 3306 -u root; | |
| RUN whoami; | |
| RUN mysql; | |
| # RUN mysql -h 127.0.0.1 -P 30306 -u root; | |
| # RUN sudo mysql -h localhost -u root; | |
| # CMD mysql -h localhost -u root; | |
| # CMD mysql -h 127.0.0.1 -P 3306 -u root && show databases; | |
| # CMD mysql -h localhost -u root && show databases; | |
| # CMD source test.sql | |
| # ENTRYPOINT ["flask"] | |
| # CMD ["run", "--host=0.0.0.0","--port=7860"] |