-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simulation-2d docker Image #7
Conversation
containers/simulation-2d.Dockerfile
Outdated
FROM robocin/cpp-ubuntu-20.04:latest | ||
|
||
# packages setup | ||
RUN apt update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Já é resolvido em robocin/cpp-ubuntu-20.04:latest. Não seria redundante?
E além disso, apenas o upstream das fontes é atualizado com apt update
, não há mudança no sistema.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sinceramente, eu só copiei o Dockerfile.exodia do simulation-2d-cpp e queria ver a action em ação. Tem que mudar algumas coisas até pra começar a usar o robocin-install
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pode remover sim [link]
containers/simulation-2d.Dockerfile
Outdated
cd rcssmonitor && ./bootstrap && ./configure && \ | ||
make && make install && \ | ||
cd /root && rm -rf rcssmonitor | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Podemos ter aqui também o Fedit e o Soccerwindow2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sim!
containers/simulation-2d.Dockerfile
Outdated
|
||
# Set environment variables. | ||
ENV HOME /root | ||
ENV DISPLAY :0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variável mágica? Podes explicar o uso dela?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kkkkkk mágica demais, é pra definir o display padrão pro localhost
Gui apps em docker https://link.medium.com/MDgtowncwwb
O que é a variavel de ambiente display https://askubuntu.com/questions/432255/what-is-the-display-environment-variable
Basicamente quando nós rodamos um container docker temos que definir a flag -e DISPLAY=$DISPLAY pra usar a env do PC host, aí eu tô definindo para a padrao ser :0 que é a normalmente utilizada só pra evitar a flag em momentos futuros
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acho show, mas essa imagem ainda é meio que uma base, poderíamos puxar pro primeiro pai, ou colocar nas imagens filhas / no devcontainer.json
containers/simulation-2d.Dockerfile
Outdated
# rcssserver install | ||
WORKDIR /root | ||
RUN git clone https://github.com/rcsoccersim/rcssserver.git | ||
RUN \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Podemos incluir a primeira chamada do rcssserver para ele criar as configurações do server no arquivo/pasta oculta autogerada por ele.
containers/simulation-2d.Dockerfile
Outdated
@@ -0,0 +1,49 @@ | |||
# Disclaimer: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O dockerfile não utiliza módulos já baixados, não entendi o disclaimer. Podes clarificar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O disclaimer é pq eu literalmente copiei, te amo não me bate
containers/simulation-2d.Dockerfile
Outdated
|
||
RUN apt install -yq x11-apps | ||
|
||
# Define default command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Os comandos do docker são autoexplicativos. Usar comentários apenas em situações que a informação contida no código não seja suficiente para o seu entendimento.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sinceramente, eu só copiei o Dockerfile.exodia do simulation-2d-cpp e queria ver a action em ação. Tem que mudar algumas coisas até pra começar a usar o
robocin-install
Opa, eu vi isso, mas comentei coisas pra deixar normalizado a imagem, no final ela poderia ficar assim:
FROM robocin/cpp-ubuntu-20.04:latest
ARG QT=5.15.2
RUN robocin-install \
boost \
'qt ${QT}' \
rcssserver \
rcssmonitor # \
# fedit \
# soccerwindow2
ENV PATH /opt/qt/${QT}/gcc_64:$PATH
Sobre colocar as deps em /opt
no lugar de /root
, é pq é exatamente o diretório que cumpre com esse próposito [link]
containers/simulation-2d.Dockerfile
Outdated
# Define default command. | ||
CMD ["bash"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMD ["bash"]
já é setado previamente, pode remover
containers/simulation-2d.Dockerfile
Outdated
|
||
# Setup tzdata | ||
RUN \ | ||
apt-get install -yq tzdata && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tzdata
parece ser instalado previamente, pode remover
containers/simulation-2d.Dockerfile
Outdated
FROM robocin/cpp-ubuntu-20.04:latest | ||
|
||
# packages setup | ||
RUN apt update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pode remover sim [link]
containers/simulation-2d.Dockerfile
Outdated
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \ | ||
dpkg-reconfigure -f noninteractive tzdata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Essas configs são realmente necessárias?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Então, quando eu tava fazendo os updates pro Ubuntu 20.04 ele travava numa parte que ficava pedindo pra definir a timezone, e a solução que eu achei foi esse troço aí kkkkkk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qual o sw que exigiu? Eu já me deparei com esse problema mesmo, lembrei agr, mas era quando a gente puxava da imagem do ubuntu padrão
Como nossa imagem puxa de uma imagem de devcontainer, acho que isso é resolvido por baixo dos panos... Tenta seguir sem isso 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm não lembro ao certo, era algum desses pacotes que vem logo em sequencia. Creio que tenha sido o build-essential.
Pronto massa, vou tentar sem
containers/simulation-2d.Dockerfile
Outdated
RUN apt install -yq \ | ||
git build-essential automake autoconf libtool flex bison libboost-all-dev \ | ||
qt5-default libfontconfig1-dev libaudio-dev libxt-dev libglib2.0-dev libxi-dev libxrender-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acho que tudo aqui já foi instalado, exceto o qt5-default. Sugestão de substituição:
ARG QT=5.15.2
RUN robocin-install 'qt ${QT}'
ENV PATH /opt/qt/${QT}/gcc_64:$PATH
Baseado no link.
containers/simulation-2d.Dockerfile
Outdated
RUN git clone https://github.com/rcsoccersim/rcssserver.git | ||
RUN \ | ||
cd rcssserver && ./bootstrap && ./configure && \ | ||
make && make install && \ | ||
cd /root && rm -rf rcssserver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adicionar rcssserver.sh
no repo de scripts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exemplo: googletest.sh
containers/simulation-2d.Dockerfile
Outdated
WORKDIR /root | ||
RUN git clone https://github.com/rcsoccersim/rcssmonitor.git | ||
RUN \ | ||
cd rcssmonitor && ./bootstrap && ./configure && \ | ||
make && make install && \ | ||
cd /root && rm -rf rcssmonitor | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adicionar rcssmonitor.sh
no repo de scripts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exemplo: googletest.sh
containers/simulation-2d.Dockerfile
Outdated
cd /root && rm -rf rcssserver | ||
|
||
# rcssmonitor install | ||
WORKDIR /root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Poderia ser na pasta /opt
ao invés de /root
?
containers/simulation-2d.Dockerfile
Outdated
ENV DISPLAY :0 | ||
|
||
# Define working directory. | ||
WORKDIR /root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Poderia ser na pasta /opt
ao invés de /root
?
containers/simulation-2d.Dockerfile
Outdated
|
||
# Set environment variables. | ||
ENV HOME /root | ||
ENV DISPLAY :0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acho show, mas essa imagem ainda é meio que uma base, poderíamos puxar pro primeiro pai, ou colocar nas imagens filhas / no devcontainer.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imagens anteriores a essa, pra ver o que já foi instalado:
@Pvcunha qual o status? |
@ersaraujo Alem disso, continua sendo adicionadas outras necessidades que surgiram por binho como pode ser visto nesse PR atual https://github.com/robocin/simulation-2d-cpp/pull/283 |
Adds the simulation-2d dockerfile