cannot build and submit using gcloud - gcloud

I am becoming increasingly frustrated with the quickstart guide to deploying gcloud using Docker :
https://cloud.google.com/cloud-build/docs/quickstart-build
I am following every step but cannot build using the command :
gcloud builds submit --tag gcr.io/strange-vortex-286312/quickstart-image
If I list my projects this is what I see :
The tutorial says that I then use the PROJECT_ID and put it in the command which I listed above :
OK, fine. So I do exactly as the tutorial says, and run this command >
gcloud builds submit --tag gcr.io/strange-vortex-286312/quickstart-image
but then I get this error :
FETCHSOURCE
Fetching storage object: gs://strange-vortex-286312_cloudbuild/source/1597335850.83144-c6bf33c39ca54474a15cf04835a07444.tgz#1597335851899497
Copying gs://strange-vortex-286312_cloudbuild/source/1597335850.83144-c6bf33c39ca54474a15cf04835a07444.tgz#1597335851899497...
/ [1 files][ 263.0 B/ 263.0 B]
Operation completed over 1 objects/263.0 B.
BUILD
Already have image (with digest): gcr.io/cloud-builders/docker
***** NOTICE *****
Alternative official `docker` images, including multiple versions across
multiple platforms, are maintained by the Docker Team. For details, please
visit https://hub.docker.com/_/docker.
***** END OF NOTICE *****
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /workspace/Dockerfile: no such file or directory
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 1
----------------------------------------------------------------------------------------------------------------------------------------
ERROR: (gcloud.builds.submit) build 9c7c268f-07f3-486e-842f-8c1a0e2877ae completed with status "FAILURE"
I am unsure what this error message is trying to tell me.
If I to my console then I see this error :
I am also unsure what this error is trying to tell me.

OK. In my case the Dockerfile was incorrectly named.
I had..
DockerFile
..and not
Dockerfile
The capital F was the problem. It took me for ever to figure this out because DockerFile works in normal Docker so I didnt think there was an issue with capitalization.

Related

Travis CI Isn't allowing me to build

so I'm taking a course in DevOps with udacity right now, and I'm faced with a problem using Travis CI. My tutor wasn't able to help me.
The repo i'm tryin to build is https://github.com/AmrEbnNashaat/simple_node
It contains a .travis.yml file supplied by udacity and Its syntax is correct as I checked.
I have selected the free plan manually, and entered my CC information. and I have 10,000 free credit points to use. with 0 used. I have also synced github with Travis and clicked on trigger build. Faced by the message shown in the image below.
What appears when I click on trigger build
However, It doesn't build anything. It does absolutely nothing.
Below is the .travis.yml file in the repo.
language: node_js
node_js:
- 13
services:
- docker
# Pre-testing installs
install:
- echo "nothing needs to be installed"
# Scripts to be run such as tests
before_script:
- echo "no tests"
script:
- docker --version # print the version for logging
- docker build -t simple-node .
- docker tag simple-node amrnashaat98/simple-node:latest
# Tasks to perform after the process is successful. Formatting the Docker username and password as below enables you to programmatically log in without having the password exposed in logs.
after_success:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push amrnashaat98/simple-node:latest
I'm also faced with the following error whenever I open the repo I tried to build on travis.
We are unable to start your build at this time. You exceeded the number of users allowed for your plan. Please review your plan details and follow the steps to resolution.
I have also set my environment variables for DOCKER_PASSWORD and DOCKER_USERNAME.
I have also tried MANY solutions online on github/Travis's Documentation/Stackoverflow. Nothing worked!
Any help?
I have tried to build a CI pipeline using Travis CI but It doesn't build anything.

Datalore local installation to Docker postgresql error

I'm following the directions from here and I've gotten this far...
Prerequisites:
Docker Compose version v2.10.2
Clone or download the content of this repository.
Do the following to set up your database:
Open docker-compose.yaml in the [repository_folder]/docker-compose folder in any text editor and replace the values of DB_PASSWORD and POSTGRES_PASSWORD properties with any random string (both properties must have the same value). This string will be used as your database password. Make sure you keep it secret.
Run the following command and wait for Datalore to start up: docker compose up
It's at this point I get the following message:
[+] Running 0/2
- postgresql Error 0.8s
- datalore Error 0.8s
Error response from daemon: manifest for jetbrains/datalore-server:2022.3 not found: manifest unknown: manifest unknown
I'm completely void of ideas for what to try or where to look for more details to even get started other than emailing support at Jetbrains directly (which I've done). The only thing I can think of is that there's some unspoken prerequisite that I'm not aware of because the instructions don't really seem that complicated to this point.
you cloned master branch with datalore-server 2022.3, which is not released yet. You need to either clone an older version (like 2022.2.3) or edit your /docker-compose/docker-compose.yaml and change the image tags there:
datalore:
image: jetbrains/datalore-server:2022.2.3
[...]
postgresql:
image: jetbrains/datalore-postgres:2022.2.3

Unable to debug java app through stack driver in google kubernetes cluster

I am trying to debug a java app on GKE cluster through stack driver.
I have created a GKE cluster with Allow full access to all Cloud APIs
I am following documentation: https://cloud.google.com/debugger/docs/setup/java
Here is my DockerFile:
FROM openjdk:8-jdk-alpine
VOLUME /tmp
ARG JAR_FILE
COPY ${JAR_FILE} alnt-watchlist-microservice.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/alnt-watchlist-microservice.jar"]
In documentation, it was written to add following lines in DockeFile:
RUN mkdir /opt/cdbg && \
wget -qO- https://storage.googleapis.com/cloud-debugger/compute-java/debian-wheezy/cdbg_java_agent_gce.tar.gz | \
tar xvz -C /opt/cdbg
RUN java -agentpath:/opt/cdbg/cdbg_java_agent.so
-Dcom.google.cdbg.module=tpm-watchlist
-Dcom.google.cdbg.version=v1
-jar /alnt-watchlist-microservice.jar
When I build DockerFile, It fails saying tar: invalid magic , tar: short read.
In stackdriver debug console, It always show 'No deployed application found'. Which application it will show? I have already 2 services deployed on my kubernetes cluster.
I have already executed
gcloud debug source gen-repo-info-file --output-directory="WEB-INF/classes/
in my project's directory.
It generated source-context.json. After its creation, I tried building docker image and its failing.
The debugger will be ready for use when you deploy your containerized app. You are getting No deployed application found error because your debugger agent is failing to download or unzip in dockerfile.
Please check this discussion to resolve the tar: invalid magic , tar: short read. error.
Unfortunately it looks like Alpine isn't regularly tested with Debugger. There's a sample setup here that might help you: https://github.com/GoogleCloudPlatform/cloud-debug-java#alpine-linux
I resolved the issue.
Firstly, you will have to use java image "gcr.io/google-appengine/openjdk" instead of Alpine one.
Secondly,
I was putting entry points without comma separated (Basically in wrong format)
ENTRYPOINT ["java","-agentpath:/opt/cdbg/cdbg_java_agent.so", "-Djava.security.egd=file:/dev/./urandom" ,"-Dcom.google.cdbg.module=watchlist"]

Google SDK / Dialogflow Deployment Error

I've been following a tutorial on creating a chatbot with Dialogflow and I've reached the section to do the fulfillment. The Google Cloud SDK got installed but when it comes time to deploy the function I keep getting this error.
https://dialogflow.com/docs/getting-started/basic-fulfillment-conversation
Jasons-MBP-3:~ jason$ sudo gcloud beta functions deploy Goddard --stage-bucket goddard.appspot.com --trigger-http
-2 ['./.git', './.gitignore']
-1 [False, False]
ERROR: gcloud crashed (OSError): [Errno 2] No such file or directory: './Library/Application Support/Google/Chrome/RunningChromeVersion'
If you would like to report this issue, please run the following command:
gcloud feedback
To check gcloud for common problems, please run the following command:
gcloud info --run-diagnostics
I tried sudo and updating the gcloud components but still the same thing. I went to the folder it says doesnt exist and I see the file there but it's an alias. When I click the alias Finder says it can't be opened because th original can't be found. Any suggestions?
So a friend of mine told me that for this section it had to be running in the same directory where the index.js file is. In case anyone else gets stuck!

Docker compose - image not found

I'm following http://bradgessler.com/articles/docker-bundler. The first time around, it made "bundler fast again". I started getting issues with some missing linked files in the gems, so I blew away the docker images, and did a docker-compose build. After it built, I could no longer do docker-compose run web bundle -- I get this:
Creating network "myapp_default" with the default driver
Pulling bundle (myapp_web:latest)...
Pulling repository docker.io/library/myapp_web
ERROR: Error: image library/myapp_web:latest not found
How do I resolve this?
Following the same article, here are the steps that worked for me:
Run docker-compose build web
Find the name of your web image: run docker images. Mine was 'appcontainer_web'
Open docker-compose.yml and replace 'image: myapp_web' with 'image: [your_image_name]'
After the above change I still encountered an error: No closing quotation. The fix was to remove the quote from "I'm" in that same docker-compose.yml file "command: echo I'm a little..."