Created
August 1, 2017 15:49
-
-
Save andykais/b62d2a165f6996e2d7d9ac91fd599e57 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
FROM node:8-alpine | |
COPY entrypoint.sh /usr/bin/entrypoint.sh | |
# create npmrc with enviroment variable | |
RUN echo "\$NPM_TOKEN" > /root/.npmrc | |
# entrypoint script performs envsubst on npmrc | |
RUN printf '#!/bin/sh\n\ | |
sed -i "s~\$NPM_TOKEN~$NPM_TOKEN~" /root/.npmrc\n\ | |
$@' > /usr/bin/entrypoint.sh \ | |
&& chmod +x /usr/bin/entrypoint.sh | |
ENTRYPOINT ["entrypoint.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment