Blog tecnológico mantido pelos alunos da disciplina de Aplicações Informáticas (12º Ano) da Escola Secundaria José Gomes Ferreira em Lisboa.
sexta-feira, 21 de maio de 2021
[PT07] INFINIZER Digital: RFP
sexta-feira, 8 de janeiro de 2021
[IDS] Docker + Jenkins: Como iniciar o serviço do Jenkins em docker container
docker run -p 8080:8080 --name=containercomjenkins jenkins/jenkins
- "docker run" : O docker executa processos em containers individuais. Um container é um processo executado em um host qualquer - podendo este ser local ou remoto (no exemplo do artigo o host é local). Quando um operador é executado "docker run", o processo do container que é executado é isolado por ter seu próprio sistema de arquivos, sua própria rede e sua própria árvore de processo isolada/separada do host.
- "--name=[ARG]" : É uma forma de identificar o container através de um nome, sem ser pelo UUID.
- "-p PORTA_HOST:PORTA_CONTAINER": Define as portas que devem estar abertas e qual sentido as informações devem ir.
- "jenkins/jenkins" : É o nome da imagem. Uma vez que não existe localmente, ele vai fazer o pull da imagem ao Docker Hub.
domingo, 6 de dezembro de 2020
[IDS] Kubernetes: O que é?
segunda-feira, 16 de novembro de 2020
[IDS] Docker: Dockerfile, imagem, distribuição, container e registry
Dockerfile reference
Docker can build images automatically by reading the instructions from a Dockerfile. A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. Using docker build users can create an automated build that executes several command-line instructions in succession.
USAGE
The docker build command builds an image from a Dockerfile and a context. The build’s context is the set of files at a specified location PATH or URL. The PATH is a directory on your local filesystem. The URL is a Git repository location.
A context is processed recursively. So, a PATH includes any subdirectories and the URL includes the repository and its submodules. This example shows a build command that uses the current directory as context:
docker build --tag nomedaimagem:tag .
vim Dockerfile
FROM alpine:3.7 MAINTAINER Guilherme Marcello LABEL description="Imagem com os exemplos dos artigos do Blogger" WORKDIR aib/ WORKDIR blogger/ COPY . .
home@marcello:~$ ls
development Dockerfile
home@marcello:~$ docker build --tag aib2021marcello/blogger:rplotter .
...
...
Successfully built 80d3e5712bee
Successfully tagged aib2021marcello/blogger:rplotter
home@marcello:~$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
aib2021marcello/blogger rplotter 80d3e5712bee 0 minutes ago 4.21MB
alpine 3.7 6d1ef012b567 20 months ago 4.21MB
home@marcello:~$ docker run --name primeirocontainer -it aib2021marcello/blogger:rplotter /aib/blogger$ ls Dockerfile development /aib/blogger$ exit home@marcello:~$
home@marcello:~$ docker login
...
...
Login Succeeded
home@marcello:~$ docker push aib2021marcello/blogger:rplotter
4. Fazer pull da imagem no registry (poderia ser feito em qualquer computador com docker, sem precisar da autenticação, uma vez que o repositório é público):
home@marcello:~$ docker pull aib2021marcello/blogger:rplotter
sexta-feira, 13 de novembro de 2020
[IDS] Docker: Instalação em Debian-based OS
SET UP THE REPOSITORY
apt package index and install packages to allow apt to use a repository over HTTPS:$ sudo apt-get update $ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common
$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.$ sudo apt-key fingerprint 0EBFCD88 pub 4096R/0EBFCD88 2017-02-22 Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 uid Docker Release (CE deb) <docker@docker.com> sub 4096R/F273FCD8 2017-02-22
nightly or test (or both) after the word stable in the commands below.$ sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/debian \ $(lsb_release -cs) \ stable"
INSTALL DOCKER ENGINE
apt package index, and install the latest version of Docker Engine and containerd$ sudo apt-get update $ sudo apt-get install docker-ce docker-ce-cli containerd.io
hello-world image.$ sudo docker run hello-world








