-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
32 lines (23 loc) · 1.08 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
# Use the uselagoon/lagoon-cli as a base image
# FROM uselagoon/lagoon-cli as base
FROM ghcr.io/uselagoon/lagoon-cli:v0.31.4 as base
RUN apk update && apk upgrade && apk add python3 py3-pip
# Grab envplate so we can sort out the configuration files
RUN wget -q https://github.com/kreuzwerker/envplate/releases/download/v1.0.2/envplate_1.0.2_$(uname -s)_$(uname -m).tar.gz -O - | tar xz && mv envplate /usr/local/bin/ep && chmod +x /usr/local/bin/ep
# Copy the entry script and set correct permissions
COPY entry.sh /entry.sh
COPY *.py /
RUN chmod +x /entry.sh
# copy across the lagoon.yaml file
COPY lagoon.yml /rootcp/.lagoon.yml
# let's set up a symlink to the lagoon cli into the /usr/local/bin directory
RUN ln -s /lagoon /usr/local/bin/lagoon
# Set up environment variable for the SSH key
ENV INPUT_SSH_PRIVATE_KEY ""
ENV INPUT_LAGOON_GRAPHQL_ENDPOINT "https://api.lagoon.amazeeio.cloud/graphql"
ENV INPUT_LAGOON_SSH_HOSTNAME "ssh.lagoon.amazeeio.cloud"
ENV INPUT_LAGOON_PORT "32222"
ENV INPUT_LAGOON_COMMAND "whoami"
WORKDIR /
# Entry point to run the custom script
ENTRYPOINT ["/entry.sh"]