Comments (10)
For anyone getting errors with VS Code on macOS:
add the following line to settings.json
and restart the editor:
"go.toolsEnvVars": {"GOOS" : "linux"},
from containers-from-scratch.
Sorry, I don't know how I missed this. You need to build with GOOS=linux. I should add that to the README
from containers-from-scratch.
@Lucier2603 If you put // +build linux
before the package main
like so:
// +build linux
package main
GoLand will stop reporting the error.
Given that this must be built in Linux anyway it really doesn't matter.
from containers-from-scratch.
I work on Mac with GoLand. And set GOOS=linux. But still got this error. Is there somewhere else I have to set?
from containers-from-scratch.
I'm afraid I'm not familiar with GoLand, but you should have these defined OK in the Linux version of syscall. What version of Go are you using?
from containers-from-scratch.
I use Go 1.9. It works fine in Linux.
I guess it is mac that causes the error? Mac OS does not support those sys flags although I set GOOS=Linux.
from containers-from-scratch.
Anyone has any clue on how to get the flags set for mac OS?
from containers-from-scratch.
@jebuscraisp if you look at the comments for SysProcAttr you'll see that CloneFlags (and some other fields) are only supported on Linux. To try this on a Mac or Windows machine, you can run Linux in a Virtual Machine.
from containers-from-scratch.
@ludwigmuench Doesn't work on mac
from containers-from-scratch.
If you use IDEA, go to Languages & Frameworks->Go->Build Tags Vendoring to set OS as linux.
from containers-from-scratch.
Related Issues (10)
- root filesystem and chroot example not working HOT 2
- Any ideas about that why this code is not working in a Docker container. HOT 2
- cgroupsv2 adjustments proposal HOT 2
- panic on ubuntu 16.04 ARMv8 HOT 2
- CLONE_NEWNS needs MS_PRIVATE on / before fork? HOT 5
- How does the /proc mounting work? HOT 1
- Failed to create new OS Thread HOT 1
- must(syscall.Chroot("/rootfs")) gives not such file or directory HOT 2
- Can't access any external network resources HOT 3
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 containers-from-scratch.