-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first working draft of alpine image version
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
FROM alpine:3.10 | ||
|
||
ARG gdal_version='2.4.2-r1' | ||
ENV GDAL_VERSION=${gdal_version} | ||
|
||
# Setup fetch deps | ||
RUN set -ex && \ | ||
apk update && \ | ||
apk add --no-cache --virtual .fetch-deps tar openssl git | ||
|
||
# Fetch source code | ||
RUN set -x && \ | ||
mkdir -p ctbtemp && cd ctbtemp && \ | ||
git clone https://github.com/ahuarte47/cesium-terrain-builder.git && \ | ||
cd cesium-terrain-builder && \ | ||
git checkout master-quantized-mesh | ||
|
||
# Setup build deps | ||
RUN set -ex && \ | ||
apk add --no-cache --virtual .build-deps \ | ||
make cmake libxml2-dev | ||
|
||
RUN set -ex && \ | ||
apk add --no-cache --virtual .build-deps-edge \ | ||
--repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ | ||
--repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ | ||
g++ gdal-dev=$GDAL_VERSION | ||
|
||
# Build & install cesium terrain builder | ||
RUN set -x && \ | ||
cd /ctbtemp/cesium-terrain-builder && \ | ||
mkdir build && cd build && cmake .. && make install . | ||
|
||
# Setup runtime deps | ||
RUN set -ex && \ | ||
apk add --no-cache --virtual .rundeps \ | ||
bash | ||
|
||
RUN set -ex && \ | ||
apk add --no-cache --virtual .rundeps-edge \ | ||
--repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ | ||
--repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ | ||
gdal=$GDAL_VERSION | ||
|
||
# Cleanup | ||
RUN set -x && \ | ||
apk del .fetch-deps .build-deps .build-deps-edge && \ | ||
rm -rf /tmp/* && \ | ||
rm -rf /ctbtemp | ||
|
||
# Add some basic aliases | ||
RUN echo 'alias ..="cd .."' >> ~/.bashrc && \ | ||
echo 'alias l="ls -CF --group-directories-first --color=auto"' >> ~/.bashrc && \ | ||
echo 'alias ll="ls -lFh --group-directories-first --color=auto"' >> ~/.bashrc && \ | ||
echo 'alias lla="ls -laFh --group-directories-first --color=auto"' >> ~/.bashrc | ||
|
||
WORKDIR /data | ||
|
||
CMD ["bash"] |