Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Criando minha imagem com o Dockerfile

Pessoal, seguindo a aula 1, criei o arquivo Dockerfile e executei no PowerShell.

Meu arquivo é o seguinte

FROM elasticsearch:7.1.0

MAINTAINER Rogerio
LABEL version="1.0"

RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install --batch analysis-icu

EXPOSE 9200
EXPOSE 9300

E teve a seguinte saída no prompt

PS D:\Docker\elasticsearch-image> docker build -f Dockerfile -t rbrodrigues/elasticsearch-7.1.0:7.1.0 .                                                                                                                                                                        Sending build context to Docker daemon  8.704kB
Step 1/6 : FROM elasticsearch:7.1.0
7.1.0: Pulling from library/elasticsearch
8ba884070f61: Already exists                                                                                                                                                                                                                                                   f09aa32454d9: Already exists                                                                                                                                                                                                                                                   b4a4ca7a82ce: Already exists                                                                                                                                                                                                                                                   2367280307d3: Already exists                                                                                                                                                                                                                                                   00c9d8373635: Already exists                                                                                                                                                                                                                                                   882233a52616: Already exists                                                                                                                                                                                                                                                   47cc7e043508: Already exists                                                                                                                                                                                                                                                   Digest: sha256:f449aeab752587709b440a9cb9b35ed93bfabdab75fb8ae9e0b330aa0e584a51
Status: Downloaded newer image for elasticsearch:7.1.0
 ---> 12ad640a1ec0
Step 2/6 : MAINTAINER Rogerio Rodrigues rbrodrigues@gmail.com
 ---> Running in 1e6f3b166df2
Removing intermediate container 1e6f3b166df2
 ---> 564597be7073
Step 3/6 : LABEL version="1.0"
 ---> Running in 5451e23d03c2
Removing intermediate container 5451e23d03c2
 ---> 89e313d82a14
Step 4/6 : RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install --batch analysis-icu
 ---> Running in 8f68d3f99769
-> Downloading analysis-icu from elastic
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.bouncycastle.jcajce.provider.drbg.DRBG (file:/usr/share/elasticsearch/lib/tools/plugin-cli/bcprov-jdk15on-1.61.jar) to constructor sun.security.provider.Sun()
WARNING: Please consider reporting this to the maintainers of org.bouncycastle.jcajce.provider.drbg.DRBG
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
-> Installed analysis-icu
Removing intermediate container 8f68d3f99769
 ---> 349d69d2dfe5
Step 5/6 : EXPOSE 9200
 ---> Running in c373e03dc004
Removing intermediate container c373e03dc004
 ---> 2ec951d33d6e
Step 6/6 : EXPOSE 9300
 ---> Running in 3dccfbc7f943
Removing intermediate container 3dccfbc7f943
 ---> 9f8059d1dd36
Successfully built 9f8059d1dd36
Successfully tagged rbrodrigues/elasticsearch-7.1.0:7.1.0
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.
PS D:\Docker\elasticsearch-image>  

Tem WARNING, não entendi e mais um SECURITY WARNING no final.

1 resposta
solução!

Oi, Rogério, tudo bem?

Esse warning diz apenas que, como a imagem foi criada em um Windows, ele adicionou as seguintes permissões -rwxr-xr-x para máquinas não Windows. Ele diz apenas que é recomendado checar as permissões resetá-las para arquivos e diretórios sensíveis. Já que algum desses arquivos talvez não possa ter alguma dessas permissões.