Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pointcept-docker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maciej Wielgosz
pointcept-docker
Commits
f27df09c
Commit
f27df09c
authored
1 year ago
by
Maciej Wielgosz
Browse files
Options
Downloads
Patches
Plain Diff
updated key autherntication for oracle machine
parent
bb0b72db
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+3
-7
3 additions, 7 deletions
Dockerfile
with
3 additions
and
7 deletions
Dockerfile
+
3
−
7
View file @
f27df09c
...
@@ -36,11 +36,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
...
@@ -36,11 +36,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
tqdm
\
tqdm
\
pandas
pandas
# OpenSSH configuration
# OpenSSH configuration
RUN
mkdir
/var/run/sshd
\
RUN
mkdir
/var/run/sshd
\
&&
sed
's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g'
-i
/etc/pam.d/sshd
&&
sed
's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g'
-i
/etc/pam.d/sshd
# Create non-root user
# Create non-root user
ARG
UID=1000
ARG
UID=1000
ARG
GID=1000
ARG
GID=1000
...
@@ -50,19 +49,16 @@ ENV HOME /home/${USERNAME}
...
@@ -50,19 +49,16 @@ ENV HOME /home/${USERNAME}
RUN
groupadd
-g
${
GID
}
${
USERNAME
}
\
RUN
groupadd
-g
${
GID
}
${
USERNAME
}
\
&&
useradd
-ms
/bin/bash
-u
${
UID
}
-g
${
GID
}
-G
sudo
${
USERNAME
}
\
&&
useradd
-ms
/bin/bash
-u
${
UID
}
-g
${
GID
}
-G
sudo
${
USERNAME
}
\
&&
echo
"
${
USERNAME
}
:
${
USERNAME
}
"
| chpasswd
\
&&
echo
"
${
USERNAME
}
:
${
USERNAME
}
"
| chpasswd
\
&&
mkdir
-p
${
HOME
}
/data
${
HOME
}
/.vscode-server
${
HOME
}
/.ssh
\
&&
mkdir
-p
${
HOME
}
/data
${
HOME
}
/.vscode-server
${
HOME
}
/.ssh
\
&&
chown
${
USERNAME
}
:
${
USERNAME
}
${
HOME
}
/data
${
HOME
}
/.vscode-server
${
HOME
}
/.ssh
&&
chown
-R
${
USERNAME
}
:
${
USERNAME
}
${
HOME
}
# Copy your public key to the container
# Copy your public key to the container
COPY
id_rsa.pub /home/${USERNAME}/.ssh/authorized_keys
COPY
id_rsa.pub /home/${USERNAME}/.ssh/authorized_keys
RUN
chown
${
USERNAME
}
:
${
USERNAME
}
/home/
${
USERNAME
}
/.ssh/authorized_keys
\
RUN
chown
${
USERNAME
}
:
${
USERNAME
}
/home/
${
USERNAME
}
/.ssh/authorized_keys
\
&&
chmod
600 /home/
${
USERNAME
}
/.ssh/authorized_keys
&&
chmod
600 /home/
${
USERNAME
}
/.ssh/authorized_keys
VOLUME
[ "${HOME}/data", "${HOME}/.ssh", "${HOME}/.vscode-server"]
VOLUME
[ "${HOME}/data", "${HOME}/.ssh", "${HOME}/.vscode-server"]
# Expose SSH
# Expose SSH
EXPOSE
22
EXPOSE
22
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment