Skip to content

Commit

Permalink
refs #31, #35: Support Korean input in git/shell kernel
Browse files Browse the repository at this point in the history
 * Adds LANG to allowed environment variable in sorna-jail.

 * Explicit initialize UTF-8 locale in Dockerfile.
  • Loading branch information
achimnol committed Feb 11, 2017
1 parent 235f7ed commit ac85b89
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bin/intra-jail
Git LFS file not shown
2 changes: 1 addition & 1 deletion bin/intra-jail-check
Git LFS file not shown
4 changes: 2 additions & 2 deletions bin/jail
Git LFS file not shown
4 changes: 2 additions & 2 deletions bin/jail-check
Git LFS file not shown
2 changes: 2 additions & 0 deletions git/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
venv
9 changes: 8 additions & 1 deletion git/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN echo 'APT::Install-Recommends "false";' >> /etc/apt/apt.conf; \
RUN apt-get update
RUN apt-get install -y --only-upgrade tzdata
RUN apt-get install -y build-essential git-core wget ca-certificates libseccomp2 \
libreadline-dev libsqlite3-dev libssl-dev libbz2-dev libzmq3-dev tk-dev
libreadline-dev libsqlite3-dev libssl-dev libbz2-dev libzmq3-dev tk-dev
ADD install-python.sh /home/sorna/install-python.sh
ADD pyenv-run.sh /home/sorna/pyenv-run.sh
RUN chmod +x /home/sorna/*.sh
Expand Down Expand Up @@ -84,6 +84,13 @@ USER root
RUN apt-get install -y nano vim
RUN apt-get install -y nodejs nodejs-legacy npm

# Configure the shell to use Unicode characeters
ENV LANG en_US.UTF-8
RUN sed -i 's/# *\(set convert-meta off\)/\1/' /etc/inputrc; \
locale-gen en_US.UTF-8; \
echo 'set hlsearch incsearch sts=4 sw=4 et' >> /etc/vim/vimrc.local; \
echo 'set enc=utf8 tenc=utf8' >> /etc/vim/vimrc.local

# Secure installation scripts
USER root
# NOTE: you must copy $GOPATH/bin to <dockerfile_dir>/
Expand Down
2 changes: 1 addition & 1 deletion jail/policy/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (p *DefaultPolicy) GetExtraEnvs() []string {

func (p *DefaultPolicy) GetPreservedEnvKeys() []string {
return []string{
"HOME", "PATH",
"HOME", "PATH", "LANG",
"PYENV_ROOT", "PYTHONPATH",
"LD_PRELOAD",
}
Expand Down
2 changes: 1 addition & 1 deletion jail/policy/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (p *GitPolicy) GetExtraEnvs() []string {

func (p *GitPolicy) GetPreservedEnvKeys() []string {
return []string{
"HOME", "PATH",
"HOME", "PATH", "LANG",
"PYENV_ROOT", "PYTHONPATH",
"MPLCONFIGDIR",
"LD_PRELOAD",
Expand Down
2 changes: 1 addition & 1 deletion jail/policy/julia.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (p *JuliaPolicy) GetExtraEnvs() []string {

func (p *JuliaPolicy) GetPreservedEnvKeys() []string {
return []string{
"HOME", "PATH",
"HOME", "PATH", "LANG",
"PYENV_ROOT", "PYTHONPATH",
"PYTHONUNBUFFERED",
"JULIA_CPU_CORES",
Expand Down
2 changes: 1 addition & 1 deletion jail/policy/python-tensorflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (p *PythonTensorFlowPolicy) GetExtraEnvs() []string {

func (p *PythonTensorFlowPolicy) GetPreservedEnvKeys() []string {
return []string{
"HOME", "PATH",
"HOME", "PATH", "LANG",
"PYENV_ROOT", "PYTHONPATH",
"PYTHONUNBUFFERED",
"MPLCONFIGDIR",
Expand Down
2 changes: 1 addition & 1 deletion jail/policy/python.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (p *PythonPolicy) GetExtraEnvs() []string {

func (p *PythonPolicy) GetPreservedEnvKeys() []string {
return []string{
"HOME", "PATH",
"HOME", "PATH", "LANG",
"PYENV_ROOT", "PYTHONPATH",
"PYTHONUNBUFFERED",
"MPLCONFIGDIR",
Expand Down

0 comments on commit ac85b89

Please sign in to comment.