Comments (6)
Issue appears to be referencing the devcontainer-kubernetes/main.tf example template.
from envbuilder.
Passing the image name invalid-image
to envbuilder results in the fallback image being used.
Build logs:
envbuilder - Build development environments from repositories in a container
#1: ๐ฆ Cloning invalid-url to /workspaces/invalid-url...
Failed to clone repository: clone "invalid-url": exec: "git": executable file not found in $PATH
Falling back to the default image...
#2: Deleting filesystem...
#2: ๐๏ธ Building image...
#2: Retrieving image manifest codercom/enterprise-base:ubuntu
...
$ coder ssh bob
coder@coder-danny-bob-69b8f664ff-fk6c4:/workspaces$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
This satisfied the first clause of the feature:
https://pkg.go.dev/github.com/coder/envbuilder#section-readme
FallbackImage
specifies an alternative image to use when neither an image is declared in the devcontainer.json file nor a Dockerfile is present.
I'm now going to test out how it behaves when an invalid devcontainer/Dockerfile works.
from envbuilder.
An invalid devcontainer also falls back just fine:
I used this devcontainer: (note the invalid JSON).
#1: ๐ฆ Cloned repository! [1.178864329s]
Failed to parse devcontainer.json: standardize json: hujson: line 5, column 5: invalid character ']' after object value (expecting ',' or '}')
Falling back to the default image...
#2: Deleting filesystem...
#2: ๐๏ธ Building image...
#2: Retrieving image manifest codercom/enterprise-base:ubuntu
...
$ coder ssh bob
coder@coder-danny-bob-84998f4f99-5z9cb:/workspaces$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
from envbuilder.
An invalid Dockerfile also falls back just fine:
I used this devcontainer: (note the invalid Dockerfile)
#1: ๐ฆ Cloned repository! [851.098596ms]
#2: Deleting filesystem...
#2: ๐๏ธ Building image...
Failed to build: parsing dockerfile: dockerfile parse error on line 1: unknown instruction: INVALID
Falling back to the default image...
#2: Deleting filesystem...
#3: ๐๏ธ Building image...
#2: Retrieving image manifest codercom/enterprise-base:ubuntu
...
$ coder ssh bob
coder@coder-danny-bob-84998f4f99-5z9cb:/workspaces$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
from envbuilder.
Closing, this bug no longer exists.
from envbuilder.
This was fixed by #30
from envbuilder.
Related Issues (20)
- Gitlab oauth2:token being written to .git/config file after cloning HOT 1
- Support all (or most) Kaniko flags
- Write RFC around performance/caching improvements
- Option to specify build path for Dockerfile
- Autogenerate docs for all envbuilder flags HOT 10
- Update Dev Containers docs and example templates in Coder HOT 1
- โ๏ธ v1.0 release
- Investigate feasibility of `docker-compose` support HOT 1
- chore: avoid unnecessary image pulls while testing HOT 1
- Investigate GPU support HOT 2
- Running envbuilder CLI on a local laptop may destroy the filesystem HOT 7
- publish envbuilder binary HOT 2
- Explore buildah in place of kaniko HOT 1
- Test CLI output against a golden file
- Test to validate that envs given previously will still produce the same options now in Serpent
- Keep the comments on the struct and insteadย go generateย the serpent descriptions from those HOT 1
- Warn if clean up does not work when removing Docker config file.
- no Dockerfile or devcontainer.json found: no fallback image has been specified HOT 2
- (breaking) Prefix all envbuilder environment variables with ENVBUILDER_ HOT 11
- Flake: TestBuildFromDevcontainerInRoot
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from envbuilder.