Skip to content

Commit

Permalink
Can run the program.
Browse files Browse the repository at this point in the history
  • Loading branch information
kurron committed Sep 14, 2018
1 parent c9f2535 commit 5b8f0c0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
23 changes: 19 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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"]
8 changes: 4 additions & 4 deletions tag-and-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
UNIXTIME=$(date +%s)

# docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
docker tag dockerazuljdk8_azul-jdk:latest kurron/docker-azul-jdk-8:latest
docker tag dockerazuljdk8_azul-jdk:latest kurron/docker-azul-jdk-8:${UNIXTIME}
docker tag snowsql:latest kurron/snowsql:latest
docker tag snowsql:latest kurron/snowsql:${UNIXTIME}
docker images

# Usage: docker push [OPTIONS] NAME[:TAG]
docker push kurron/docker-azul-jdk-8:latest
docker push kurron/docker-azul-jdk-8:${UNIXTIME}
docker push kurron/snowsql:latest
docker push kurron/snowsql:${UNIXTIME}

0 comments on commit 5b8f0c0

Please sign in to comment.