-
Notifications
You must be signed in to change notification settings - Fork 82
/
Dockerfile
33 lines (25 loc) · 743 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM ubuntu:20.04
MAINTAINER Shaobo He <[email protected]>
ENV SMACKDIR /home/user/smack
RUN apt-get update && \
apt-get -y install \
software-properties-common \
wget \
sudo \
g++
# Borrowed from JFS
# Create `user` user for container with password `user`. and give it
# password-less sudo access
RUN useradd -m user && \
echo user:user | chpasswd && \
cp /etc/sudoers /etc/sudoers.bak && \
echo 'user ALL=(root) NOPASSWD: ALL' >> /etc/sudoers
USER user
# Add the current directory to `/home/user/smack`
ADD --chown=user . $SMACKDIR
# Set the work directory
WORKDIR $SMACKDIR
# Build SMACK
RUN bin/build.sh
# Add envinronment
RUN echo "source /home/user/smack.environment" >> ~/.bashrc