This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run \ | |
-v c:/Users /data/:/var/lib/mysql \ | |
-p 3306:3306 \ | |
-e MYSQL_ROOT_PASSWORD=rootPassword \ | |
-e MYSQL_DATABASE=database \ | |
-e MYSQL_USER=user \ | |
-e MYSQL_PASSWORD=password \ | |
--name mysql \ | |
mysql:5.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run \ | |
-p 8080:80 \ | |
--link=mysql:db \ | |
-e WORDPRESS_DB_HOST=db:3306 \ | |
-e WORDPRESS_DB_NAME=database \ | |
-e WORDPRESS_DB_USER=user \ | |
-e WORDPRESS_DB_PASSWORD=password \ | |
--name WordPress \ | |
WordPress:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker stop WordPress mysql | |
docker rm WordPress mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.10 | |
RUN apt-get update | |
RUN apt-get install -y nodejs npm | |
RUN npm install -g http-server | |
WORKDIR /usr/apps/dockerfileinnutshell/ | |
CMD ["http-server", "-p", "8080"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker build -t <USERNAME>/nodejswebserver:latest . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker push <username>/nodejswebserver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<img src="https://cdn-images-1.medium.com/fit/c/40/40/2*nEw0ZjcLVXjOLiO4_oYG7w.jpeg"> | |
<h1>Hello I'm learning how to write a docker file !!!! Oops!!!!</h1> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -it -p 8080:8080 -v ${PWD}:/usr/apps/dockerfileinnutshell <USERNAME>/nodejswebserver:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM microsoft/dotnet:2.2-aspnetcore-runtime AS base | |
WORKDIR /app | |
EXPOSE 80 | |
EXPOSE 443 | |
FROM microsoft/dotnet:2.2-sdk AS build | |
WORKDIR /src | |
COPY ["CustomGridViewAndTagCloud/CustomGridViewAndTagCloud.csproj", "CustomGridViewAndTagCloud/"] | |
RUN dotnet restore "CustomGridViewAndTagCloud/CustomGridViewAndTagCloud.csproj" | |
COPY . . |
OlderNewer