-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dockerfile.alpine: cleanup, add tools like tmux, micro for easing dia…
…gnostics and more prolonged work
- Loading branch information
Showing
1 changed file
with
18 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,20 @@ | ||
## Usage: | ||
## 1) docker build -t vlang_alpine - < Dockerfile.alpine | ||
## 2) alias with_alpine='docker run -u 1000:1000 --rm -it -v .:/src -w /src vlang_alpine:latest' | ||
FROM alpine:3.20 | ||
|
||
LABEL maintainer="spytheman <[email protected]>" | ||
|
||
WORKDIR /opt/vlang | ||
|
||
ENV PATH /opt/vlang:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | ||
|
||
## install development packages | ||
RUN apk --no-cache add \ | ||
musl-dev libc-dev libc6-compat gcompat | ||
|
||
RUN apk --no-cache add \ | ||
musl-dev libc-dev libc6-compat gcompat \ | ||
openssl-dev sqlite-dev mbedtls \ | ||
libuv-dev libev-dev libevent-dev libmemcached-dev | ||
|
||
RUN apk --no-cache add \ | ||
libuv-dev libev-dev libevent-dev libmemcached-dev \ | ||
binutils diffutils elfutils pcre strace \ | ||
libunwind-dev libunwind-static gc | ||
|
||
RUN apk --no-cache add \ | ||
make bash file git upx | ||
|
||
RUN apk --no-cache add gcc gdb wasi-sdk | ||
|
||
RUN apk --no-cache add \ | ||
libunwind-dev libunwind-static gc gc-dev \ | ||
make bash file git upx tmux micro nano nano-syntax \ | ||
gcc gdb wasi-sdk \ | ||
mesa-dev mesa-gl mesa-gles mesa-glapi \ | ||
glfw-dev \ | ||
glu-dev \ | ||
|
@@ -32,9 +23,7 @@ RUN apk --no-cache add \ | |
freeglut-dev \ | ||
libxi-dev libxi-static \ | ||
libxcursor-dev \ | ||
libx11-dev | ||
|
||
RUN apk --no-cache add \ | ||
libx11-dev \ | ||
icu-data-full \ | ||
sdl2_net-dev \ | ||
sdl2_gfx-dev \ | ||
|
@@ -45,9 +34,7 @@ RUN apk --no-cache add \ | |
sdl2-dev | ||
|
||
RUN ln -s /opt/vlang/v /usr/local/bin/v | ||
|
||
COPY . /vlang-local | ||
|
||
ARG USE_LOCAL | ||
RUN if [[ -z "${USE_LOCAL}" ]] ; then \ | ||
git clone --depth=1 --quiet https://github.com/vlang/v/ /opt/vlang && \ | ||
|
@@ -56,22 +43,20 @@ RUN if [[ -z "${USE_LOCAL}" ]] ; then \ | |
mv /vlang-local/* . && \ | ||
rm -rf /vlang-local ; \ | ||
fi | ||
|
||
RUN mkdir -p /tmp/v /tmp/v /home/ && chown -Rh 1000:1000 /opt/ /tmp/ /home/ | ||
|
||
## setup runtime environment for v and bash: | ||
USER 1000:1000 | ||
ENV HOME /home | ||
ENV VTMP /tmp/v | ||
ENV VMODULES /tmp/vmodules | ||
|
||
RUN make && v -version && ls -la v | ||
RUN du -b -s . | ||
RUN time v -prod -skip-unused doctor | ||
RUN time v -prod -skip-unused self | ||
RUN time v -prod -skip-unused cmd/tools/vfmt.v | ||
RUN find . -type f -name *_test.v -or -name *.vv -or -name *.out | xargs rm | ||
RUN rm -rf v_old vc/ .git/ | ||
RUN du -b -s . | ||
|
||
RUN make && v -version && ls -la v && \ | ||
du -b -s . && \ | ||
time v doctor && \ | ||
time v cmd/tools/vfmt.v && \ | ||
time v -prod self && \ | ||
true | ||
RUN find . -type f -name *_test.v -or -name *.vv -or -name *.out | xargs rm && \ | ||
rm -rf v_old vc/ .git/ && \ | ||
du -b -s . | ||
CMD ["v"] |