How to run container for development for react-dnd / react-dnd? - dockerfile

I have a simple task, which is to take a look at the source code for this project:
https://github.com/react-dnd/react-dnd
But the challenge is the there is no source code in github, except a docker container folder:
react-dnd/.devcontainer/
My question is for this project(https://github.com/react-dnd/react-dnd), how do I run the docker to see the source code?

Related

AWS CodeBuild with Multi Docker Containers: unable to prepare context: unable to evaluate symlinks in Dockerfile path

so I am trying to deploy my multi-docker container(Frontend, Backend, and Nginx containers) application in AWS BeansTalk. I am using CodeBuild to build the docker images using buildspec.yml file. The build fails when trying to build the first container(containerizing frontend application). Kindly refer to the image attached for the error details.
It is basically saying could not find the Dockerfile in the client directory but the funny thing is that it exists and it works as expected locally when I build the containers with docker-compose.
Here is the project directory:
buildspec.yml file:
For the benefit of others, The reason for the error is that the Dockerfile is missing in the location. Make sure you have the DockerFile inside the directory (./client in this case). It has to be exactly spelled as Dockerfile. If it's not, check the source repo and ensure that the Dockerfile file is committed.

Google Cloud Build pipeline in Mono-repository architecture with single cloudbuild

We are using multiple python deployments into a single GitHub repository with a folder structure. Each directory contains a separate scripts module.
service-1/
deployment-1/
app/
Dockerfile
cloudbuild.yaml
deployment-2/
app/
Dockerfile
cloudbuild.yaml
service-2/
deployment-1/
app/
Dockerfile
cloudbuild.yaml
service-3/
deployment-1/
app/
Dockerfile
cloudbuild.yaml
deployment-2/
app/
Dockerfile
cloudbuild.yaml
.gitignore
README.md
requirements.txt
where deployment-1 will work as a single deployment and deployment-2 as another deployment for each service.
We are planning to manage a single trigger in a pipeline that triggers the build only for the deployment where the latest commit is found.
If anyone can please provide suggestions on how to keep single YAML files & build it better way using the cloud build. So that we don't require to manage multiple triggers.
Sadly, nothing is magic!! The dispatch is either done by configuration (multiple trigger) or by code.
If you want to avoid multiple trigger, you need to code the dispatch:
Detect the code that have change in GIT (could be several service in the same time)
Iterate over the updated folders and run a Cloud Build (so, a new one) for each of them
It's small piece of shell code. Not so difficult but you have to maintain/test/debug it. Is it easier that multiple trigger? It's up to you, according to your team skills in devops area.

How can I find source code folder within docker container when debugging in VScode

I have a containerized C++ application, I've build the image and also able to run the model executable file inside the container in windows prompt
I'm following this article to setup the debug in VScode.
If I use ls -al Ican see the source code files in it, but I use docker diff, it returns things like this:
docker diff container_name
C /root
A /root/.bash_history
There are huge amount of those stuff, but I can't find the source code folder that I can attach here:
Then I can only get this:
This doesn't look like a source code folder at all, what have I done wrong, I don't understand.
If I check the running container docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
xxx xxx "/bin/bash" 21 minutes ago Up 13 minutes xxx
I noticed '/bin/bash' looks strange to me, the folder I attached only contain some bash cache etc instead of the really source code, where did they go??? I'm so confused. I've been stuck with this for a whole afternoon. Can someone help me, thanks.
Provided the container is still running and has not been terminated or has not correctly been set up (or else docker ps might not list it), as a diagnostic tool, you can use the exec command, available from Docker 1.3 that allows to run a command to an existing running instance of a container. So you can open a shell, ssh, or just ls and explore its file system to understand what that running container instance is about.
While not a complete solution, I hope this helps.

Google Container Registry build trigger on folder change

I can setup a build trigger on GCR to build my Docker image every time my Git repository gets updated. However, I have a single repository with multiple folders, and a Docker file in each folder.
Ex:
my_app
-- service-1
Dockerfile-1
-- service-2
Dockerfile-2
How do I only build Dockerfile-1 when the service-1 folder gets updated?
This is a variation on this GitHub feature request -- in your case, differential behavior based on the changed files (folders) rather than the branch.
We are considering this feature as part of the development of support for more advanced workflow control and will post back on that GitHub issue when it becomes available.
The work-around available to you today is to use a bash script that conditionally builds (or doesn't) based on an inspection of the files changed in the $COMMIT_SHA that triggered the build. Note that the git builder can be used to get the list of files changed via git diff-tree --no-commit-id --name-only -r $COMMIT_SHA.

Building Linux C++ with VSTS

I'm trying to build a C++ app for Linux using VSTS. The build is defined by the Docker container template, and the Agent queue is Hosted Linux.
When running, I get
[error]Unhandled: No Docker file matching /opt/vsts/work/1/s/**/Dockerfile was found.
How do I create the Docker file requested by the error message?
The error means that there isn’t the Dockerfile file existing in working folder, you can include the Dockerfile file in the source control and map to the agent (Get sources of build definition)
There is the Docker image that shared by others, for example: madduci/docker-ubuntu-cpp and the CMake generated files will be in build folder, if you just need to build the C++ project, you can refer to these steps (CMakeLists.txt is in the root of the repository):
Add Docker task (Action: Run a Docker command; Command: run -v $(Build.SourcesDirectory):/project madduci/docker-ubuntu-cpp)
Publish Build Artifacts (Path to publish: $(Build.SourcesDirectory)/build)
If you need to build the docker image, you need to create Dockerfile.
When the Docker task is set to Build an image you get an option to specify a Docker file:
**/Dockerfile means that the task will search your repository for a file named Dockerfile and use that to build the image.
The error you get means that this file can't be found. You can find some examples of Dockerfiles here in the Docker documentation. This blog describes how to build C++ applications that run on a Linux container