forked from code-golf/code-golf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
84 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM debian:buster-slim as builder | ||
|
||
RUN mkdir /empty | ||
|
||
RUN apt-get update && apt-get install -y gcc git make | ||
|
||
RUN git clone -b 0.2 git://github.com/vlang/v /opt/v | ||
|
||
RUN cd /opt/v && make | ||
|
||
FROM debian:buster-slim | ||
|
||
RUN apt-get update && apt-get install -y libc-dev | ||
|
||
COPY --from=0 /opt/v/thirdparty/tcc /opt/v/thirdparty/tcc | ||
COPY --from=0 /opt/v/v /opt/v/v | ||
COPY --from=0 /opt/v/vlib /opt/v/vlib | ||
|
||
FROM scratch | ||
|
||
COPY --from=1 /bin /bin | ||
COPY --from=1 /lib /lib | ||
COPY --from=1 /lib64 /lib64 | ||
COPY --from=1 /opt/v /opt/v | ||
COPY --from=0 /empty /proc | ||
COPY --from=0 /empty /tmp | ||
COPY --from=1 /usr /usr | ||
|
||
COPY v /usr/bin/ | ||
|
||
CMD ["/opt/v/v", "version"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh -e | ||
|
||
# FIXME Setting VVV=/opt/v doesn't prevent the need to cd. | ||
cd /opt/v | ||
|
||
# FIXME "v run -" writes the code to the cwd first, which fails under r/o. | ||
# V panic: Failed to create temporary file 01ETADWV0J7NFKFRH587599FQQ.v | ||
|
||
# Compile | ||
cat - > /tmp/code.v | ||
./v /tmp/code.v | ||
rm /tmp/code.v | ||
|
||
# Execute | ||
shift | ||
exec /tmp/code "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.