fbctf
fbctf copied to clipboard
Composer error
In the latest edition Standard Docker Startup or Installation Guide, Production or Installation Guide, Development
These commands have been executed: sudo apt-get install ntp sudo service ntp stop sudo ntpd -gq sudo service ntp start
docker build --build-arg MODE=prod --build-arg DOMAIN=test.mydomain.com --build-arg [email protected] --build-arg TYPE=certbot -t="fbctf_in_prod" .
but There is still a problem Do not run composer as root/super user!
I think it's the problem of composer
but How to solve
@justinwray
@MNWPRO My apologies, the documentation for manual Docker install had not been updated for 16.04. Therefore you were getting outdated packages when running through the install steps.
The updates have been added here.
Also do not worry about the Do not run Composer as root/super user
message. That is just a default warning. We are not running it as root/sudo.
@stevcoll The latest updates are still ineffective, Encountered the same mistake. And then it stopped Docker build failed
Edit: Since you're using Docker, did you remove the old container and images first? Before the most recent installation? Or rename the new image?
Did you start over with your VM from scratch or try to install over the last installation? I tested the entire process earlier and didn't have any issues.
Can you paste all commands run (could use history command to get everything you've run) and your entire provision log here? Also you are using 16.04 right?
Also you seem to be using an old version of the FBCTF source files. Update your repo before you run anything else:
cd fbctf
git fetch
git pull
I don't have an old fbctf image @stevcoll
Can you run git log
in the fbctf directory and give us the commit head? Something weird is going on; we are way ahead of HHVM version 3.11 for instance.
wait a moment
@stevcoll Are some of the files not updated?
When you installed the second time (after documentation update), did you remove the previous FBCTF Docker image and container? You wouldn't be able to use the same name twice without an error. Based on the testing here and your Composer issue, it seems like somehow you're running the old container.
sudo docker image ls
sudo docker container ls
sudo docker image rm [id/name]
sudo docker container rm [id/name]
@stevcoll
After the execution of the command
The problem is not solved
@MNWPRO Sorry to see you are having issues deploying the docker image.
Looking over your screenshots, it is clear that something is outdated on your system. It shows you using HHVM version 3.11.1 while the project is currently using 3.21.
@stevcoll had you verify the local git repository on your system, and that appears up-to-date, so something else is causing an issue. A few possibilities include:
- An existing (old) Docker image
- Outdated system packages/outdated host system
- Local modifications to the git repo
Could you please provide answers the following:
- What Linux Distribution and version thereof are you running docker on (that is, your host system)?
- Do you have any existing/previously built FBCTF docker images (see @stevcoll's comment for details on how to obtain this)?
- Are there any local modifications to the FBCTF code (use
git status
to verify this)?
I would also like you to try using the Quick Setup process, to deploy:
git clone https://github.com/facebook/fbctf
cd fbctf
source ./extra/lib.sh
quick_setup start_docker dev
I didn't change the source code I've tried Quick Setup process,but There's the same mistake @justinwray
Is there a good solution to the problem @stevcoll
@MNWPRO We're just gonna need to get more detail here. It's still very puzzling that you're on an older version of HHVM. If you look at extra/lib.sh under the function install_hhvm(), you'll see that it should be installing HHVM (xenial-lts-3.21). Something weird is going on because after the new keys are added and apt-get repo updated, you should be getting HHVM version 3.21. Older versions of HHVM are not going to work, thus your dependency issues.
I would suggest, paste your entire provision log in here. All the output you get from the Docker install. Don't paste screenshots, copy and paste the output and wrap it with code tags here, or attach a text file. We need to see why you're getting an older version of HHVM.
@stevcoll I read the lib.sh, it's 3.21
The problem is here:
Failed to fetch http://dl.hhvm.com/ubuntu/dists/xenial-lts-3.21/InRelease Could not resolve 'dl.hhvm.com'
Please do an nslookup on dl.hhvm.com
Without being able to resolve that domain and fetching the data, you are not going to get the newer version of HHVM, which is what is causing your issues.
nslookup failed ! @stevcoll How to solve
I tried all the possible ways. All failed. Can you provide a docker image of a developer mode? @stevcoll I'll be very grateful.
A bit out of this specific problem context, but may be useful for those others finding this Issue title "Composer error" to resolve a different problem, a friendly reminder:
Minimum of 2GB of memory needs to be allocated if you're installing FBCTF into Docker container on a VMware (or similar) VM. VMware defaults to 1GB out-of-the-box (but of course it can be changed per each VM). I hadn't noticed this as the cause of my problems trying to get FBCTF installed on Docker on VMware until I stumbled across the memory requirement statement somewhere around here. In my case, the FBCTF was failing at the point in the shell script where Composer was being installed. Just a friendly reminder!
@eeeehaw I'll try it