forked from kurron/docker-snowsql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
23 additions
and
8 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 |
---|---|---|
|
@@ -2,6 +2,8 @@ FROM ubuntu:18.04 | |
|
||
MAINTAINER Ron Kurr <[email protected]> | ||
|
||
RUN apt-get update && apt-get --assume-yes install curl | ||
|
||
# Create non-root user | ||
RUN groupadd --system snowflake --gid 444 && \ | ||
useradd --uid 444 --system --gid snowflake --home-dir /home/snowflake --create-home --shell /sbin/nologin --comment "Docker image user" snowflake && \ | ||
|
@@ -10,9 +12,22 @@ chown -R snowflake:snowflake /home/snowflake | |
# default to being in the user's home directory | ||
WORKDIR /home/snowflake | ||
|
||
# show the JVM version, by default | ||
CMD ["date"] | ||
ENV LC_ALL=C.UTF-8 | ||
ENV LANG=C.UTF-8 | ||
ENV VERSION 1.1.62 | ||
ENV SNOWSQL_DEST /usr/local/bin | ||
ENV SNOWSQL_LOGIN_SHELL /home/snowflake/.bashrc | ||
|
||
# grab the iinstallation script | ||
RUN curl -o snowsql-${VERSION}-linux_x86_64.bash http://s3-us-west-2.amazonaws.com/sfc-snowsql-updates/bootstrap/1.1/linux_x86_64/snowsql-${VERSION}-linux_x86_64.bash | ||
|
||
# Install the tool | ||
RUN bash snowsql-${VERSION}-linux_x86_64.bash | ||
|
||
# remember to switch to the non-root user in child images | ||
# Switch to the non-root user | ||
# USER snowflake | ||
USER snowflake | ||
RUN snowsql --versions | ||
|
||
ENTRYPOINT ["snowsql"] | ||
|
||
CMD ["-v"] |
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