Unverified Commit a2bd7165 authored by Féry Mathieu (Mathius)'s avatar Féry Mathieu (Mathius)
Browse files

feat(docker): Add auth in dev image

parent 02faec66
Pipeline #34287 passed with stages
in 3 minutes and 52 seconds
......@@ -127,6 +127,7 @@ build:jar:
build:docker-dev:
<<: *baseDocker
script:
- echo $GCp_KEY_DEV >> service-account-file.json
- apk add zip
- mkdir -p BOOT-INF/classes
- echo "oauth.providers=" >> BOOT-INF/classes/oauthKeys.properties
......
FROM google/cloud-sdk
RUN apt-get install openjdk-11-jdk
ARG JAR_FILE=target/*-spring-boot.jar
ARG CREDENTIALS=service-account-file.json
COPY ${JAR_FILE} app.jar
COPY ${CREDENTIALS} service-account-file.json
COPY run-dev.sh run.sh
EXPOSE 8080
ENTRYPOINT ["sh", "run.sh"]
\ No newline at end of file
#!/bin/sh
gcloud auth activate-service-account --key-file service-account-file.json
gcloud config set project "${DATASTORE_PROJECT_ID}"
java -jar /app.jar
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment