Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create custom user account on run #49

Open
LuisBosquez opened this issue Mar 16, 2017 · 11 comments
Open

Create custom user account on run #49

LuisBosquez opened this issue Mar 16, 2017 · 11 comments

Comments

@LuisBosquez
Copy link
Contributor

From the comments section in DockerHub: https://hub.docker.com/r/microsoft/mssql-server-linux/

Create a customer user admin login with environment variables for added security.

@twright-msft
Copy link
Collaborator

FYI - We released CTP 1.4 today. This release of the mssql-server-linux image now includes the mssql-tools package (sqlcmd and bcp) in it.

Executing sqlcmd as part of the entrypoint.sh script can be used for this kind of scenario for now. Since this is such a commonplace requirement we want to make it easier in the future, but sqlcmd will provide a reasonable option until then.

@chkm8
Copy link

chkm8 commented Mar 18, 2017

Hi, I tried to use the tag CTP 1.4 but sqlcmd is not found in terminal. Thanks

@chkm8
Copy link

chkm8 commented Mar 18, 2017

Hi, I saw your demo https://github.com/twright-msft/mssql-node-docker-demo-app, and i was able to use the sqlcmd base on your guide. Maybe we could include this code in creating the docker image, in order for the sqlcmd be visible globally?
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc source ~/.bashrc

@twright-msft
Copy link
Collaborator

We've run into problems in the past with conflicting file names, in particular the rather generic name 'bcp'. So, for now at least, we recommend pointing to the tools using the fully qualified path.

@spafcio
Copy link

spafcio commented Mar 20, 2017

This is my Dockerfile for building a custom image based on the ctp1-1:

RUN apt-get update &&
apt-get install -y curl apt-transport-https &&
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - &&
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | tee /etc/apt/sources.list.d/msprod.list &&
apt-get update &&
apt-get install -y mssql-tools unixodbc-dev &&
locale-gen en_US en_US.UTF-8 &&
ln -sfn /opt/mssql-tools/bin/sqlcmd* /usr/local/bin/sqlcmd &&
ln -sfn /opt/mssql-tools/bin/bcp* /usr/local/bin/bcp

@mloskot
Copy link

mloskot commented Sep 28, 2017

OTOH, why not make the image users even easier

MySQL images, for example, are configurable allow to create extra user via environment

MYSQL_USER: joe
MYSQL_PASSWORD: pass123

Why not provide similar hook into the mssql image initialization?

@pawelmaslyk
Copy link

I don't think anyone is looking into this issue anymore.

@mloskot
Copy link

mloskot commented Sep 28, 2017

@pawelmaslyk They should have closed it then. @twright-msft?

@twright-msft
Copy link
Collaborator

We still plan on adding this. Just havent gotten to it yet.

@bappajubcse05
Copy link

Any update on this please

@ghost
Copy link

ghost commented Jul 30, 2019

Any news on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants