Spaces:
Build error
Build error
Hannes Kath
commited on
Commit
·
df2f50c
1
Parent(s):
531f94e
change Dockerfile
Browse files- Dockerfile +17 -4
Dockerfile
CHANGED
|
@@ -1,8 +1,21 @@
|
|
| 1 |
# syntax=docker/dockerfile:1
|
| 2 |
FROM alpine
|
|
|
|
|
|
|
| 3 |
RUN apk add --no-cache openssh-client
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
RUN --mount=type=ssh \
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# syntax=docker/dockerfile:1
|
| 2 |
FROM alpine
|
| 3 |
+
|
| 4 |
+
# Install OpenSSH client
|
| 5 |
RUN apk add --no-cache openssh-client
|
| 6 |
+
|
| 7 |
+
# Configure SSH and add GitLab host key
|
| 8 |
+
RUN mkdir -p -m 0700 ~/.ssh && \
|
| 9 |
+
ssh-keyscan git.ni.dfki.de >> ~/.ssh/known_hosts
|
| 10 |
+
|
| 11 |
+
# Mount SSH key and run SSH connection test
|
| 12 |
RUN --mount=type=ssh \
|
| 13 |
+
ssh -q -T git@git.ni.dfki.de:iml/cst/pam_al_ui.git 2>&1 | tee /hello
|
| 14 |
+
|
| 15 |
+
# Activate SSH agent and add SSH key
|
| 16 |
+
RUN eval $(ssh-agent) && \
|
| 17 |
+
ssh-add ~/.ssh/id_rsa
|
| 18 |
+
|
| 19 |
+
# Build Docker image with SSH
|
| 20 |
+
# Note: Replace "your_image_name" with your desired image name
|
| 21 |
+
$ docker buildx build --ssh default=$SSH_AUTH_SOCK -t annotation_tool_image .
|