-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (29 loc) · 1.13 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Usage:
#
# docker run -d -P -e "PROJECT=YourProjectId" totomz/google-datastore:latest
#
#
FROM anapsix/alpine-java:8_jdk
MAINTAINER Tommaso Doninelli <[email protected]> (@totomz)
# Update the OS and install dependencies
RUN apk update && apk add wget bash python docker && rm -rf /var/cache/apk/*
# Download and install the cloud sdk
RUN wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz --no-check-certificate \
&& tar zxvf google-cloud-sdk.tar.gz \
&& rm google-cloud-sdk.tar.gz \
&& ls -l \
&& ./google-cloud-sdk/install.sh --usage-reporting=true --path-update=true
# Add gcloud to the path
ENV PATH /google-cloud-sdk/bin:$PATH
# Configure gcloud for your project
RUN yes | gcloud components update
RUN yes | gcloud components update preview
RUN yes | gcloud components install beta gcd-emulator
# Prepare a directory for the launch script
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Epose the port of google datastore
EXPOSE 8014
# Execute the launch script
ENTRYPOINT [ "docker-entrypoint.sh" ]
CMD [ "google-datastore" ]