Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add dockerfile for c4go #370

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

UtkarshGupta-CS
Copy link
Contributor

@UtkarshGupta-CS UtkarshGupta-CS commented Mar 31, 2019

closes #346

Screenshot 2019-03-31 at 9 25 47 PM

add docker build and run doc in readme
@codecov
Copy link

codecov bot commented Mar 31, 2019

Codecov Report

Merging #370 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #370   +/-   ##
=======================================
  Coverage   85.96%   85.96%           
=======================================
  Files         188      188           
  Lines       11027    11027           
=======================================
  Hits         9479     9479           
  Misses       1106     1106           
  Partials      442      442

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2d7a6a...aa09d1f. Read the comment docs.

docker build -t c4go .

# Run the container for the c4go image
docker run --rm -it c4go
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,
It is look great.
May you add example of command for transpiling C code from folder ./example/.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now, for myself- not clear location output Go code- inside docker or outside

Copy link

@inmcm inmcm May 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to test this with:

~/Dev/docker/c4go/examples [master] $ docker run -v $(realpath prime.c):/prime.c --rm -it c4go transpile /prime.c
Error: Preprocess error : preprocess for file: [/prime.c]
failed: exec: "clang": executable file not found in $PATH
StdErr =

Is clang included in the Alpine image?

FROM golang:latest as builder
WORKDIR /src
ADD . .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o c4go .
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is possible to run command 'go generate' for generate version of program?

@Konstantin8105 Konstantin8105 added good first issue Good for newcomers question Further information is requested labels Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker file
3 participants