Closed pmatthews05 closed 2 years ago
Have you tried the make local?
Hi @LaurentLesle unfortunately, local doesn't even build.
I've started from fresh this morning. Cleaned my laptop of all docker containers/images/volumes. Grabbed a fresh copy of the rover repository.
Opening the repository in VSCode within a container.
I have made my change within the functions.sh file. Within Dockerfile, I have added two run files either side of line 339 "Installing Terraform ${versionTerraform}" to echo out the ${versionRover}. This is to ensure the version number changes.
Opening the VSCode terminal in a bash window, I call make dev
. (make local
just doesn't work for me.)
It states it is creating version aztfmod/aztfmod/rover-preview:1.0.1-2107.010817
While running, steps 65 clearly shows the right version number, so does step 67 after running Installing Terraform and copying the versionRover to /tf/rover/version.txt.
However, once it is successfully built, it tags it with the original tag name aztfmod/rover:0.15.4-2105.2603, not the new preview version.
In Docker it shows the new image created but with the old version number too.
The file that was copied to /tf/rover/version.txt still also shows the old version number, although I'm starting to think it's updating this file within an image, not the rover project I have open.
What I have now worked out, if I retag my image to my preview tag
docker tag aztfmod/rover:0.15.4-2105.2603 aztfmod/rover-preview:1.0.1-2107.010817
Then complete the rest of the steps:
It seems to be running my new docker image. If I then open the /tf/rover folder, I can see that the version.txt file is correct, and my changes are showing in my functions.sh file.
Calling rover command now, shows the version.
I'm able to continue for now, but there is definitely an issue with setting the right version within the dockerfile, and the instructions are not correct.
Thanks @pmatthews05 for reporting this issue. Looks like we have a regression. I keep the issue opened until fixed.
Hi @pmatthews05 I have reviewed your issue and it is normal the make dev is trying to connect to the docker hub to upload the preview version. We are using that command to generate public preview versions of the rover.
To create a local version of the rover, I open with vscode the rover project and make sure it is opened in the dev container. Then I have to sudo the make local to get the local version created. To use the new rover I update the docker-compose with image: rover-local:1.0.4-2108.301429 (note aztfmod/ has to be removed)
I have created a patch for the next release that will skip the agents creation when running 'sudo make local'
For some reasons if I do not sudo the make local I have the process partially working, meaning the base image is created but the tag rover-local:xxx is not created
I will wait for the next release and review it then.
We have just refactored with this release the way docker images are built. It is now use the buildx which allow us to add support for ARM64 as well (Mac M1 support). Those foundation will allow us to add a new feature to build the rover for your private docker registry.
You can test the latest code with 'make local' to build a local version
Our goal is to add 'make private' to upload in your private registry the images.
Following the instructions within the documentation (./docs/DEV_CONTAINER.md), but I'm unable to get it to work at the end. Please note, until this project, I've never touched docker, bash, Linux etc before.
I'm using a Windows device with Docker installed, and VSCode.
Below are the steps I've taken
I've taken a forked of this project and cloned it down to my laptop, and opened the rover project.
I've then ensured the project is running inside the container.
Modified the relevant files e.g /scripts/function.sh
Following the DEV_CONTAINER.md, in the bash terminal inside the container project, I've run![image](https://user-images.githubusercontent.com/6736509/123786118-3db57a00-d8d1-11eb-9f7a-d035177a1009.png)
make dev
This appears to create build, with a version, aztfmod/rover-preview:1.0.1-2106.290834, and fails to push to docker.io repository as stated in the documentation. (Also when I first did this the version wasn't aztfmod/rover-preview, it was aztfmod/rover:0.15.4-2105.2603. I'm not sure what I did to get it to change to a preview value).Next step states to update the docker compose file within the .devcontainer/docker-compose.yml. Am I correct that this is the file for the container it's already siting in?
I've replaced the following:
with
Delete the rover volume. I'm unable to do this from within the container. Is that right? But I can from the windows terminal, I can call the command.![image](https://user-images.githubusercontent.com/6736509/123787504-ced92080-d8d2-11eb-96dc-db29801a2d40.png)
docker volume ls
. Callingdocker volume rm rover_devcontainer_volume-caf-vscode
gives me an error message as stated in the documentation, and I can remove it using the long Id.I then Restart Dev Container which then gives me the following screen. However, I'm unable to type in the terminal, no input works.![image](https://user-images.githubusercontent.com/6736509/123787641-fb8d3800-d8d2-11eb-8510-a56aa21fb042.png)
@hattan Are you able to help an advise, as you wrote the documentation.
My main questions summarised are: