coder / sail

Deprecated: Instant, pre-configured VS Code development environments.
https://sail.dev
MIT License
629 stars 36 forks source link

Failed to Build image, Exit 100 #261

Closed Merith-TK closed 4 years ago

Merith-TK commented 4 years ago
[merith@archlinux .ssh]$ sail run  merith-tk/sail
2020-03-05 09:25:37 INFO    running docker build --network=host -t merith-tk_sail -f /home/merith/Projects/merith-tk/sail/.sail/Dockerfile /home/merith/Projects/merith-tk/sail --label com.coder.sail.base_image=merith-tk_sail
Sending build context to Docker daemon  9.485MB
Step 1/8 : FROM codercom/ubuntu-dev-go:latest
 ---> bba480e31f87
Step 2/8 : SHELL ["/bin/bash", "-c"]
 ---> Using cache
 ---> 53edc1ef0766
Step 3/8 : RUN sudo apt-get update &&   sudo apt-get install -y htop
 ---> Running in 53e3737a0672
sudo: unable to resolve host archlinux: Invalid argument
Ign:1 http://security.ubuntu.com/ubuntu cosmic-security InRelease
Err:2 http://security.ubuntu.com/ubuntu cosmic-security Release
  404  Not Found [IP: 91.189.91.23 80]
Ign:3 http://archive.ubuntu.com/ubuntu cosmic InRelease
Ign:4 http://archive.ubuntu.com/ubuntu cosmic-updates InRelease
Ign:5 http://archive.ubuntu.com/ubuntu cosmic-backports InRelease
Err:6 http://archive.ubuntu.com/ubuntu cosmic Release
  404  Not Found [IP: 91.189.88.24 80]
Err:7 http://archive.ubuntu.com/ubuntu cosmic-updates Release
  404  Not Found [IP: 91.189.88.24 80]
Err:8 http://archive.ubuntu.com/ubuntu cosmic-backports Release
  404  Not Found [IP: 91.189.88.24 80]
Reading package lists...
E: The repository 'http://security.ubuntu.com/ubuntu cosmic-security Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu cosmic Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu cosmic-updates Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu cosmic-backports Release' does not have a Release file.
The command '/bin/bash -c sudo apt-get update &&   sudo apt-get install -y htop' returned a non-zero code: 100
2020-03-05 09:25:45 FATAL   failed to build image: failed to build: exit status 100

this is what i get when i try to edit my fork of sail (so that i can add a feature that i and im sure a few others would use)

Merith-TK commented 4 years ago

output with -v

[merith@archlinux ~]$ sail -v run merith-tk/sail   
\2020-03-05 09:27:54 DEBUG  verified Docker is running
2020-03-05 09:27:54 INFO    running docker build --network=host -t merith-tk_sail -f /home/merith/Projects/merith-tk/sail/.sail/Dockerfile /home/merith/Projects/merith-tk/sail --label com.coder.sail.base_image=merith-tk_sail
Sending build context to Docker daemon  9.485MB
Step 1/8 : FROM codercom/ubuntu-dev-go:latest
 ---> bba480e31f87
Step 2/8 : SHELL ["/bin/bash", "-c"]
 ---> Using cache
 ---> 53edc1ef0766
Step 3/8 : RUN sudo apt-get update &&   sudo apt-get install -y htop
 ---> Running in 52ceeec54aae
sudo: unable to resolve host archlinux: Invalid argument
Ign:1 http://security.ubuntu.com/ubuntu cosmic-security InRelease
Ign:2 http://archive.ubuntu.com/ubuntu cosmic InRelease
Ign:3 http://archive.ubuntu.com/ubuntu cosmic-updates InRelease
Err:4 http://security.ubuntu.com/ubuntu cosmic-security Release
  404  Not Found [IP: 91.189.88.174 80]
Ign:5 http://archive.ubuntu.com/ubuntu cosmic-backports InRelease
Err:6 http://archive.ubuntu.com/ubuntu cosmic Release
  404  Not Found [IP: 91.189.88.174 80]
Err:7 http://archive.ubuntu.com/ubuntu cosmic-updates Release
  404  Not Found [IP: 91.189.88.174 80]
Err:8 http://archive.ubuntu.com/ubuntu cosmic-backports Release
  404  Not Found [IP: 91.189.88.174 80]
Reading package lists...
E: The repository 'http://security.ubuntu.com/ubuntu cosmic-security Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu cosmic Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu cosmic-updates Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu cosmic-backports Release' does not have a Release file.
The command '/bin/bash -c sudo apt-get update &&   sudo apt-get install -y htop' returned a non-zero code: 100
2020-03-05 09:28:02 FATAL   failed to build image: failed to build: exit status 100
dougnukem commented 4 years ago

I'm also running into this, it appears it might be related to Ubuntu 18.10 being a non-LTS release and only having a 9 month support window:

Not sure if there's an easy fix to upgrade in the .sail/Dockerfile or if it's best to fix the base image:

Merith-TK commented 4 years ago

We could see the difference between a base image and their image, and try to recreate it?

dougnukem commented 4 years ago

This hack downgrades the .sail/Dockerfile to Ubuntu 18.04 LTS to avoid that error, but now I'm getting a new error in the Node code (maybe that needs to be pinned to a specific version too, it appears its an error on a deprecated method):

https://github.com/dougnukem/sail/blob/997bff4de75b992f34706d53d39a431090ed2eeb/.sail/Dockerfile#L4-L11

I think the real fix might be to downgrade the base docker image to an LTS version https://hub.docker.com/r/codercom/ubuntu-dev-go to Ubuntu 18.04LTS

Node error:

Step 10/11 : RUN installext peterjausovec.vscode-docker
 ---> Running in 6a69967454c3
(node:7) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
INFO  code-server v1.1119-vsc1.33.1
ERROR (node:18) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
ERROR
ERROR Extension 'peterjausovec.vscode-docker' not found.
ERROR Make sure you use the full extension ID, including the publisher, eg: ms-vscode.csharp
ERROR
ERROR Failed Installing Extensions: peterjausovec.vscode-docker
ERROR
Merith-TK commented 4 years ago

maybe remove that command from the docker image? it looks like it just cant find that extension name,

dougnukem commented 4 years ago

Looks like some of these underlying problems are reported as separate issues:

dougnukem commented 4 years ago

Hmm it looks like sail is downloading the latest linux release which now includes arm64 and amd64 architectures, so it's incorrectly downloading the arm64 AARCH one resulting in the error:

code-server DOWNLOAD URL: https://github.com/cdr/code-server/releases/download/2.1698/code-server2.1698-vsc1.41.1-linux-arm64.tar.gz
/lib/ld-linux-aarch64.so.1: No such file or directory
Merith-TK commented 4 years ago

open a new issue?

dougnukem commented 4 years ago

I think I've got a work around for all the issues, but it will require a new docker base image to be pushed

Merith-TK commented 4 years ago

Just a side note, when upgrading to your version of sail, i did have to prune my docker (not an issue, i can just re-download them as i am on my dev machine, not my production) due to a binary execution error, probably because of the issue you fixed

Merith-TK commented 4 years ago

also i noticed your path is windows? /Users/douglasdaniels ?? Can you check if the folder C:\var was created?? —Merith

On Tue, Mar 10, 2020 at 2:02 PM Merith notifications@github.com wrote:

Just a side note, when upgrading to your version of sail, i did have to prune my docker (not an issue, i can just re-download them as i am on my dev machine, not my production) due to a binary execution error, probably because of the issue you fixed

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cdr/sail/issues/261?email_source=notifications&email_token=ACPQOXRDVOWY3FKTM2PHKG3RG2TIFA5CNFSM4LCO2HTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEONEOVI#issuecomment-597313365, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPQOXQLXDBURNLIEPEWINTRG2TIFANCNFSM4LCO2HTA .

dougnukem commented 4 years ago

@Merith-TK my host machine was MacOS, and my changes in that pr should only impact the docker virtual machine which is ubuntu linux based so i dont think there should be any issues on windows.

Merith-TK commented 4 years ago

alright, that makes sense,