- Ubuntu 16.04 x64
- Docker install-docker-ubuntu-16-04.md
- Docker image for Spark: andypetrella/spark-notebook
docker pull andypetrella/spark-notebook:0.9.0-SNAPSHOT-scala-2.11.8-spark-2.2.1-hadoop-2.7.2-with-hive
| ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>'; | |
| ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '<password>'; |
| docker ps | |
| # to check all the containers, include not-running containers | |
| docker ps -a |
| # login into mysql | |
| docker logs mysql1 2>&1 | grep GENERATED # check the automatically generated password of root user, copy it | |
| docker exec -it mysql1 mysql -u root -p # parse and press the Enter key |
| # stop and remove the container and run again: | |
| docker stop mysql4 && docker rm mysql4 | |
| docker run - name=mysql1 -e MYSQL_ROOT_HOST=% -p 3306:3306 -d mysql/mysql-server |
| docker run - name=mysql1 -d mysql/mysql-server | |
| # print the logs of mysql1 | |
| docker logs mysql1 |
| docker pull mysql/mysql-server:latest |
| <!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api --> | |
| <dependency> | |
| <groupId>javax.servlet</groupId> | |
| <artifactId>javax.servlet-api</artifactId> | |
| <version>4.0.1</version> | |
| <scope>provided</scope> | |
| </dependency> |
| @WebServlet("/DemoServlet") | |
| public class DemoServlet extends HttpServlet { | |
| protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { | |
| response.setContentType("text/html"); | |
| PrintWriter out = response.getWriter(); | |
| out.println("<h3>Hello World!</h3>"); | |
| } | |
| } |
docker pull andypetrella/spark-notebook:0.9.0-SNAPSHOT-scala-2.11.8-spark-2.2.1-hadoop-2.7.2-with-hive