This file contains hidden or 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
build-dev: | |
@docker build -f ./docker/dev/Dockerfile -t dockerized-dotnet:dev . | |
tag=1.0.0 | |
build-prod: | |
@docker build -f ./docker/prod/Dockerfile -t dockerized-dotnet:${tag} . | |
@docker tag dockerized-dotnet:${tag} dockerized-dotnet:latest | |
console: build-dev | |
@docker run --rm -it dockerized-dotnet:dev sh |
This file contains hidden or 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 mcr.microsoft.com/dotnet/sdk:3.1-alpine | |
ENV WORKDIR /app | |
WORKDIR ${WORKDIR} | |
COPY dockerized-dotnet.csproj . | |
RUN dotnet restore | |
COPY . . |
This file contains hidden or 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 mcr.microsoft.com/dotnet/sdk:3.1-alpine AS step1 | |
WORKDIR /src | |
COPY dockerized-dotnet.csproj . | |
RUN dotnet restore | |
COPY . . | |
RUN dotnet publish -c release -o /app | |
FROM mcr.microsoft.com/dotnet/aspnet:3.1-alpine | |
WORKDIR /app | |
COPY --from=step1 /app . |
This file contains hidden or 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
project_name=dockerized-dotnet | |
init_command="dotnet new webapi -o ${project_name} --no-https" | |
docker_image=mcr.microsoft.com/dotnet/sdk:3.1-alpine | |
docker run --rm -td --name "${project_name}-init" "${docker_image}" sh -c "${init_command} && sleep 60" | |
sleep 20 | |
docker cp ${project_name}-init:/${project_name} . |
This file contains hidden or 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
PYENV_PYTHON_VERSION=3.1 | |
brew install pyenv | |
pyenv install $PYENV_PYTHON_VERSION | |
pyenv global $PYENV_PYTHON_VERSION | |
pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc |
This file contains hidden or 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
{ | |
"schema": {...}, | |
"payload": { | |
"before": { | |
"id": 1004, | |
"first_name": "Anne Marie", | |
"last_name": "Kretchmar", | |
"email": "[email protected]" | |
}, | |
"after": null, |
This file contains hidden or 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
public class Cafeteira { | |
public static void main( String[] args ) | |
{ | |
System.out.println( "Bem vindo ao Cafe Liskov!" ); | |
Cafe cafezinho = new Cafe(); | |
Adocante melMaple = new MelMaple(); | |
cafezinho.adicionarAdocante(melMaple); |
This file contains hidden or 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
public class MelMaple extends Mel { | |
@Override | |
public void adocar(Bebida bebida) { | |
bebida.saborAdocicado += 3; | |
} | |
} |
This file contains hidden or 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
public class Cafe extends Bebida { | |
public void adicionarAdocante(Adocante adocante) { | |
adocante.adocar(this); | |
} | |
} | |
public class Cafeteira { | |
public static void main( String[] args ) | |
{ | |
System.out.println( "Bem vindo ao Cafe Liskov!" ); |
This file contains hidden or 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
public interface Adocante { | |
public void adocar(Bebida b); | |
} | |
public class AcucarComum implements Adocante { | |
@Override | |
public void adocar(Bebida bebida) { | |
bebida.saborAdocicado+=1; | |
} | |
} |